MEXICO CITY (AP) — Mexico’s president lashed out Friday at Moody’s ratings service, after it downgraded the Mexican government’s debt outlook to “negative.”

Moody’s said it had downgraded the government’s debt outlook from “stable” to “negative” because newly approved laws in Mexico could weaken the judiciary branch and checks and balances. It reaffirmed Mexico’s Baa2 overall credit rating, but said increased government debt represented a risk for Mexico.

It also mentioned the possibility that the government will have to transfer more money to shore up the highly indebted state-owned oil company, Pemex.

President Claudia Sheinbaum said that ratings agencies often have a “bias of origin” against the economic policies her party adopted under former President Andrés Manuel López Obrador, who took office on Dec. 1, 2018.

“Many times these ratings agencies are aimed at issuing evaluations starting from an economic model,” Sheinbaum said. “Starting in 2018, the economic model in our country changed. Many times these ratings have this bias of origin.”

Under López Obrador, who was Sheinbaum’s political mentor, the government began transferring large amounts of money to the state-run oil company, started large building projects and implemented cash handout programs. That led to federal budget deficits of about 6% of Mexico’s gross domestic product in 2024, which are expected to continue, albeit at somewhat lower levels, in 2025.

And Sheinbaum continued López Obrador’s push to implement changes to the judiciary that will make all federal judges stand for election in 2025 and 2026. The United States and business groups say that could weaken the independence of the courts, and make them vulnerable to political pressure.

Critics say that could also allow drug cartels to fund judges’ election campaigns and get their own candidates elected.

“Deteriorating debt affordability and further government spending rigidity make fiscal consolidation challenging, following this year’s widening in the government deficit,” Moody’s wrote, “a deviation from a longstanding track record of low deficits regardless of economic pressures.”

“At the same time, the constitutional overhaul risks eroding checks and balances of the country’s judiciary system, with potential negative impact to Mexico’s economic and fiscal strength,” it continued, adding the changes “have the potential to materially alter the checks and balances and the business operating environment in the country.”

Based on that and other factors, the Mexican peso has dropped in value to about 20.50 to $1 in recent days.