(Bloomberg) -- Mexican President Andres Manuel Lopez Obrador vowed to restore the national oil company to its former glory. Instead, Petroleos Mexicanos is drowning in debt, its oil output is declining, and now it appears to be losing fuel market share in its own backyard.

In the past 21 months of the Lopez Obrador administration, Pemex has lost roughly 13% of Mexico’s gasoline market to private companies, compared with 4.5% in the previous 35 months since Mexico liberalized its fuels market, according government figures compiled by Bloomberg. His government is now seeking to dial back the reforms that have allowed the world’s biggest players to wrest business from Pemex.

“The cracks are beginning to appear” in AMLO’s energy policies, said Rajan Vig, founder of independent oil-trading firm Indimex in Mexico City. “Demand continues to exist. In fact, it has increased. And if you restrict supply, people are going to have to find more creative ways of bringing in the product.”

In 2016, Mexico allowed companies other than Pemex to import, distribute and sell fuels for the first time since the industry was nationalized in 1938. Since then, the world’s top energy companies have invested aggressively in Mexico, with oil majors such as Royal Dutch Shell Plc, BP Plc, Chevron Corp and Exxon Mobil Corp opening thousands of gasoline stations, and international trading houses including Koch Industries Inc., Glencore Plc and Trafigura Beheer BV building fuel storage, transport and logistics infrastructure to bring more barrels into the country.

Those efforts are bearing fruit. At the end of August, private companies were supplying about 17.5% of total gasoline volumes in the country and approximately 27% of diesel, fuels production and imports data from the energy ministry show. While Pemex saw a jump in diesel imports in August, in June and July private companies imported more diesel than the state-owned oil company for the first time.

The trend bodes poorly for the Lopez Obrador administration, which has pledged to strengthen Pemex by dialing back the 2013-2014 energy reforms of the previous administration. Last week, AMLO told energy regulators in a closed-door meeting to stop issuing new permits for fuel retailers and energy infrastructure. He said that he will consider changing the constitution in the next three years if his goal of reversing output declines at Pemex can’t be met under current laws.

©2020 Bloomberg L.P.