


On a sweltering day in August, Claudia Sheinbaum appeared with her mentor, President Andrés Manuel López Obrador, to inaugurate one of the costliest infrastructure projects in Mexico’s history: a $16 billion oil refinery.
The sprawling complex in Mr. López Obrador’s home state, Tabasco, forms the capstone of an energy strategy that he will bequeath to Ms. Sheinbaum, a climate scientist, when she takes the presidency in October.
As countries around the world feverishly turn to clean energy sources, Mexico has placed a colossal bet on fossil fuels, with the costs of that strategy now coming painfully into view.
Mexico’s oil production tumbled to a 45-year low this year, one of the steepest output declines anywhere in the world this century. Blackouts plagued the country after Mr. López Obrador heaped scorn on wind farms that could help satisfy electricity demand. Natural gas imports for the strained grid are soaring, making energy independence an ever more distant dream.
Pemex, the state-controlled oil giant, is now the world’s most indebted oil company after going on a spending spree to build projects. To stave off a default on its nearly $100 billion debt, the company has required multibillion-dollar bailouts using taxpayer money.
The disorder in Mexico’s energy industry lays bare a dilemma that will shape the country’s fortunes — and Ms. Sheinbaum’s presidency — in the years to come. Ms. Sheinbaum, who has a Ph.D. in energy engineering, has signaled that she wants Mexico to pivot to clean energy sources. But the biggest obstacles in her way may be her mentor’s nationalistic energy policies that are fixated on oil — and her reluctance to bump heads with the man who helped put her in office.