(Bloomberg) -- Mexico’s bill to increase government controls over the fuel market won final congressional approval in the latest blow to the country’s historic opening up of the energy industry.With 65 lawmakers in favor, 47 opposed, and 6 abstaining, the senate on Thursday passed the proposal from President Andres Manuel Lopez Obrador to expand control over gasoline and diesel distribution, imports and marketing. It also allows the government to suspend permits from fuel-market operators based on national or energy security reasons, and it lets state-owned oil company Petroleos Mexicanos take over their facilities.The bill was approved in general terms before it passed the article-by-article discussion by a similar margin. It will go now to Lopez Obrador, known as AMLO, to be signed into law. The lower house had cleared the legislation last week.Since reaching power in late 2018, Lopez Obrador has fought against 2013-2014 energy reforms that ended almost eight decades of state monopoly and lured investments from Royal Dutch Shell Plc, Chevron Corp. and a number of other companies. The changes in fuel market rules are the latest move by the nationalist president to roll back those reforms, and restore Pemex and power utility Comision Federal de Electricidad to their former glory.It has been a long-sought goal by Lopez Obrador, who cut his political teeth as an activist for indigenous rights in the oil state of Tabasco, where he was born. He has never hid his admiration for Lazaro Cardenas, the president that nationalized Mexico’s oil industry in 1938, and has repeatedly attacked foreign companies operating in the country, saying they didn’t deliver on their promises to boost crude production.Read More: AMLO Has a Grand Plan to Transform Mexico, on the CheapJust on Wednesday, the lower house passed another bill that removes an article from the nation’s oil law compelling regulator CRE to issue so-called asymmetric regulations to privilege private companies in sales of fuels from Pemex refineries. The proposal is now heading to the senate.Duncan Wood, vice president of strategy at the Washington-based Wilson Center, said that the law is in clear violation of both the Mexican constitution and the USMCA trade deal.“This is an expected next step in AMLOs plan to centralize control of the energy sector and close down opportunities for private investors,” Wood said in an interview.The Mexican peso maintained its daily decline after the bill was passed and remained almost unchanged against the dollar later, while the 10-year bond rate mostly maintained its Thursday advance to trade around 6.76%.More: Mexico’s AMLO Pounces on Texas Freeze to Push Nationalist AgendaCostly SupportDuring the debate, opposition lawmakers warned the bill could drive foreign investors out of Mexico. But Ricardo Monreal, the head of Lopez Obrador’s party in the senate, said the bill was needed to fight illegal fuel trafficking and corruption that previous administrations had fostered.“We have truth,” the senator said, ruling out that the legislation will hurt private companies or violate the USMCA.Mexico’s costly support of loss-making state firms drains public resources for essential spending, while private sector underinvestment threatens to slow the country’s growth, the U.S. Treasury Department said in its semiannual report to Congress.The fuel-market legislation is expected to be held up in courts, like a similar bill to prioritize CFE in the power market that was passed last month. On Thursday, Mexico’s antitrust regulator said it filed a constitutional challenge before the country’s supreme court over the law, arguing that parts of it violate constitutional protections for competitive electricity markets by privileging the state-run power utility.Onexpo, the national fuel retailers’ association, said in a statement last week that fuel permit holders are studying legal options to defend their interests.Once a monopoly, Pemex’s share of the gasoline and diesel market has fallen since the reform of the sector, but private players have less than a 30% market share. Pemex expects its gasoline sales won’t fully recover to pre-pandemic levels this year as lockdown measures hurt demand and competitors win market share.The company is also struggling with long-term oil production declines and the highest debt level of any major oil producer.(Updates with final vote in third paragraph.)For more articles like this, please visit us at bloomberg.comSubscribe now to stay ahead with the most trusted business news source.©2021 Bloomberg L.P.