Mexican lawmakers on Sunday rejected constitutional electricity reforms at the center of diplomatic tensions with the United States, in a blow to President Andres Manuel Lopez Obrador.

Lopez Obrador promoted the changes to strengthen the state-owned electricity provider and roll back the effects of liberalization under previous governments that he says favored private companies.

But his plans alarmed the United States and Canada, prompting warnings that Mexico is in danger of violating its trade commitments by favoring state-run entities heavily dependent on fossil fuels.

After a marathon session in the lower house of Congress on Easter Sunday, Lopez Obrador's Morena party failed to secure the two-thirds majority needed to amend the constitution.

There were 275 votes in favor and 223 against the bill, with no abstentions, the president of the lower house, Sergio Gutierrez, announced.

Gutierrez had earlier accused the opposition of wanting to remain "imperialist lackeys" at the service of foreign companies.

But Jorge Romero of the conservative National Action Party argued that the bill would put the country "back 50 years" in efforts to protect the environment.

Lopez Obrador's Morena party and its allies only have 277 seats out of a total of 500 in the Chamber of Deputies, and the opposition bloc had vowed to vote against the legislation.

Supporters of Mexican President Andres Manuel Lopez Obrador hold a protest to call for his predecessors to face trial over corruption allegations
Supporters of Mexican President Andres Manuel Lopez Obrador hold a protest to call for his predecessors to face trial over corruption allegations AFP / PEDRO PARDO

Earlier during the debate, supporters of Lopez Obrador held a rally outside the Chamber of Deputies calling for the reforms to be passed, with one carrying a sign that said "Don't sell out the nation."

The bill's failure represents "a big defeat for Morena and Lopez Obrador because it is one of the central axes of their project to nationalize energy," Jose Antonio Crespo, a political analyst at the Center for Research and Teaching in Economics, told AFP.

The United States had warned that Mexico's reforms risk bringing "endless litigation" that would impede investment and undermine joint efforts to fight climate change.

"Mexico's energy policies damage the environment, US business and investor interests in multiple sectors, and hamper joint efforts to mitigate climate change," US Trade Representative Katherine Tai said last month according to her office.

Canada and Spain are also concerned about the consequences for their energy companies that have invested in Mexico.

The changes would have ensured that the state-owned Federal Electricity Commission (CFE) has at least 54 percent of the electricity market -- a move the government says is needed to prevent soaring power prices.

A defeat for the constitutional reform bill does not, however, necessarily mean the end of Lopez Obrador's electricity industry changes.

Mexico's Supreme Court this month endorsed a reform aimed at strengthening the CFE that was approved by Congress in 2021 but has become bogged down in legal challenges.