TULA, Mexico — President Andrés Manuel López Obrador envisions a future in which Mexico produces more oil, gasoline and electricity. But his strategy to get there relies on reaching back into his country’s past.

Breaking with a five-year-old energy overhaul that opened Mexico’s closely held oil industry to the private sector, Mr. López Obrador wants to spend billions of dollars to strengthen the dominance of Mexico’s state-owned energy companies.

“We are going to rescue this industry that is so important for the country’s development,” Mr. López Obrador told workers recently at a rusting oil refinery in Tula, about 45 miles north of Mexico City, as he accused previous governments of “plundering” the industry.

Mr. López Obrador, a proud leftist, has said he intends to restore the glory days of the national oil company, Petróleos Mexicanos, or Pemex, when it helped make Mexico self-sufficient in energy and provided hundreds of thousands of well-paying jobs. Weeks after he took office in December, the president gave the company a new slogan — “For the rescue of sovereignty” — that tapped into a deep vein of nationalism that binds the oil industry to Mexico’s very identity.