IN HIS farewell address, George Washington gave warning of the dangers of political parties. Whenever possible, he said, each party would “make the public administration the mirror of the ill-concerted and incongruous projects of faction.” Mexico's state-run oil company, Pemex, is accustomed to being the victim of ill-concerting, probably because it provides close to 40% of the government's revenue. It is also in decline. Since 2005, daily production has dropped more than 300,000 barrels per day, or some 10% of the total. Reserves have been falling since the mid-1980s.

Since the beginning of the year, Mexican politicians have been wrapped up in a debate about how to revive Pemex, which controls all aspects of petroleum in Mexico, from offshore exploration to the pump. It is riddled with wastefulness. Mexico has to import over 40% of its petrol because of a lack of refining capacity. It then resells it at subsidised prices to the public. Some $20 billion will be spent on the subsidy this year. It is hard to get rid of, both because of the direct political impact that ending it would have and because of fear of provoking inflation.

All parties agree that things look bad. There is also some consensus that deepwater exploration of the type that has been so successful in Brazil is now necessary. But there is no agreement on how to fund it, or where to get the technical expertise for deepwater drilling from. This wrangling reveals much about Mexico's underlying thinking about the respective roles of the state and the private sector.

The country's constitution states that the petroleum industry is the exclusive province of the state. The centre-right government of Felipe Calderón decided not to attempt to change this, reckoning that the secondary laws that spell out what the constitution means allow enough wiggle room for its plan.

Mr Calderón proposed a package of reforms in April after months of behind-the-scenes negotiation with the Institutional Revolutionary Party (PRI), a centrist opposition party that had been his ally in previous reforms to the state pension system and the public finances. Mr Calderón wants incentive-based contracts for deepwater exploration, to allow private industry to build refineries, and to make a series of changes to Pemex's corporate structure that would give it more autonomy while remaining part of the government.

The opposition dislikes even this limited involvement of the private sector. It can draw on popular antipathy towards the privatisation of banks and telecoms, which left assets in the hands of a small number of wealthy people and did not always result in the promised vigorous competition. Besides, argues Francisco Javier Castellón Fonseca, a senator in the opposition Party of the Democratic Revolution (PRD), the oil price is so high that private capital is hardly necessary. Despite being split by an internal struggle over the party leadership, the one thing that unites the various factions of the PRD is opposition to the government's plan.

Not all of the debate has been so high-minded. Much of it has been driven by political posturing, with each party trying to stake out a favourable position for the mid-term elections to be held next year. Mr Calderón had hoped to get a reform passed quickly. This was stymied by the opposition PRD, which seized the floor of the Chamber of Deputies and forced Mr Calderón and the PRI to subject the reform to several months of expert testimony in the Senate.

This process came to an end on July 22nd. To keep the brakes on the changes, the opposition is now organising a series of unofficial referendums on the government's proposal and on privatisation. The first will be on July 27th in Mexico City and nine states, with two more rounds to follow on the August 10th and 24th. These votes will have no legal standing but they do have the power to irritate the government. The referendum “is an action that cannot be recognised if we live under the rule of law,” says Jordy Herrera, the under-secretary of planning in the energy ministry. “The only goal of the referendum is to divide Mexicans.” Turnout is likely to be low, and those who do vote will almost certainly reject the government's proposals by an overwhelming majority.

Despite the president's high approval ratings, Ricardo Samaniego of ITAM, a university in Mexico City, says that Mr Calderón now needs to make a calculation as to how much he is willing to dilute his reform. In any case, the plan will not be approved wholesale when Congress reconvenes in September. César Hernández of CIDAC, a think-tank in Mexico City, reckons the president may be ready to compromise. “I believe the government is willing to invest political capital even in a mediocre reform,” he says.

That would at least allow the government to declare victory and move on to the 2009 elections. The outcome of Mexico's energy reform therefore looks like being just the sort of thing that George Washington warned against. Perhaps next time the oil company should try reforming the parties instead.