ARTICLE AD BOX
A contentious reform of Mexico's electricity sector has failed to get lawmakers' backing in a vote labelled as "treasonous" by the president.
The bill would have increased the say the government has over power generation.
Critics said that if it had become law, it would have weakened the private sector's role and eroded environmental protection policies.
Energy firms and investors in the US and Canada also opposed the bill.
Tempers were running high during the 12-hour-session, with opponents and supporters of the bill trading insults.
While a majority of lawmakers in the lower house voted in favour of the bill, it fell short of the two-thirds majority it needed to pass.
The bill's defeat is a big blow to President Andrés Manuel López Obrador and his Morena party, who argued that it would have made Mexico more energy independent.
Speaking during his daily morning news conference on Monday, the president labelled the vote as "treason" and said those who had voted against his bill were backing those who "had plundered Mexico".
Mr López Obrador had lobbied hard for the reform, saying that the liberalisation of the electricity sector carried out by previous governments needed to be reversed.
The liberalisation of the market has resulted in an increased share of Mexico's energy being produced by private companies. The president sees this as a dangerous dependency on private, often foreign companies.
But environmentalists say that some of the private providers have invested in renewable energies while the state-run company relies heavily on older, polluting power plants.
Lawmaker Jorge Romero of the opposition PAN party warned that Mexico would have been set back 50 years in its environmental efforts if the reform had passed.