Enrique Peña Nieto has enjoyed a comfortable lead against his rivals for much of the Mexican presidential campaign season. But recent polling suggests his victory isn't as certain as it has appeared, leaving analysts pondering the future of Petroleos Mexicanos, the country's creaky state-owned oil company, should the candidate's main leftist rival win on July 1. 

Andrés Manuel López Obrador, a long-time politician who served as mayor of Mexico City from 2000 to 2005, narrowly lost the presidential race against current President Felipe Calderón in 2006. A victory this time around would be a major upset, jeopardizing what many economists say are necessary reforms.

The main threat stemming from a victory for Mr. López Obrador is another period of policy paralysis rather than extreme policymaking, said a report from Capital Economics released on Friday.

A poll this week by the newspaper Reforma of likely voters now has Peña Nieto of the Institutional Revolutionary Party (PRI) at 38 percent, down from 42 percent less than a month ago. Lopez Obrador of the Democratic Revolutionary Party (PRD) has seen his chances rise from 27 percent to 34 percent in the same period of time. Josefina Vázquez Mota of President Felipe Calderón's conservative National Action Party (PAN) is trailing in the low 20s.

The polling group Consulta Mitofsky put the frontrunner ahead at 35.6 percent, but also showed his support waning, by 2.3 percentage points, in the past week, Reuters reported. In that poll López Obrador saw his popularity rise 1.2 points in the same period of time.

Mexico's next president will have to confront simmering problems with Pemex, the world's third largest crude producer. The company has been a key source of government revenue funding many of the republic's social programs. Mexico's long tradition of energy sovereignty makes any move to open up the oil sector to foreign investment and extraction deeply unpopular. The country's constitution also imposes formidable hurdles to foreign direct investment in natural resources.  

But the reality is that Pemex is in desperate need of capital and technology. Output has been declining since 2004 and has decelerated at the fastest rate in decades. In 2009, the company received a wake-up call when Petroleo Brasileiro SA (NYSE: PBR), in a joint venture with London-based BP plc (NYSE: BP), announced the discovery of a massive oil field in the Gulf of Mexico southeast of Houston.

Then-Energy Minister Georgina Kessel suggested in 2009 that Mexico could follow what Brazil has done with Petrobras and open up to partnerships with foreign oil companies. Mexican oil officials and congressional delegations in recent years have visited Brazil and Norway to study how those countries opened their oil sectors, according to George Baker, oil analyst and publisher of Houston-based Mexico Energy Intelligence.

But the political will for necessary reforms is lacking, even among the country's most pro-business polticians. Nobody, it seems, is willing to touch the political hot potato of energy-sector privatization.

Peña Nieto has said he wants to open Pemex up to private parties. Well, the problem isn't opening up Pemex, the problem is opening up the oil sector, said Baker. Nobody has opened his mouth and uttered one syllable about that to my knowledge.

Meanwhile, Pemex's aging Cantarell oil field in the Gulf of Mexico, one of the largest in the world, has seen output decline in recent years by about 1.5 million barrels per day. Ku-Maloob-Zaap, Pemex's other mega-oilfield, is expected to peak this year.

Pemex is betting $1 billion on the Perdido offshore field near the U.S.-Mexico border. If the company makes a major discovery there, Baker says this could end up forcing Mexico to find a politically feasible way to utilize U.S.-side infrastructure from the nearby facilities of Royal Dutch Shell Plc (London: RDSB).

Peña Nieto may be avoiding politically charged comments that would be perceived as contradicting public sentiment if not the constitution itself, but his party would be more likely than López Obrador's to adopt a new model for the country's oil sector patterned on the Brazilian and Norwegian experiences.

The PRD is more deeply monogamous to the traditional petroleum narrative, whereas the PRI has been out of power for 12 years, out of the voters' attention for 12 years, and they might be able to say, 'hey, here's a new game plan,' said Baker.