DUBAI, U.A.E. — The two outside interests with the most at stake in Iraq’s parliamentary election on Sunday are the U.S. military and the major international oil companies.

Both are hoping the vote will yield a decisive result and produce a reasonably strong government, allowing American troops to exit and the oil companies to enter.

Read more on the Iraq election.

Iraqi Prime Minister Nouri al-Maliki, who is trying to win a second term, has made both the troop withdrawal and the revitalization of the oil sector the centerpiece of his campaign.

In recent weeks, Maliki and his oil minister, Hussain al-Shahristani, have signed a flurry of spectacular deals with the international oil companies that should enable Iraq to recover its place among the world’s major oil producers — and perhaps even challenge Saudi Arabia for the top spot by the end of the decade.

But some of Maliki’s Shiite rivals in the election, including followers of the radical cleric Moqtada al-Sadr, have denounced the deals with the foreign companies, leaving the companies to wonder what happens to their contracts if Maliki loses.

Iraq now produces about 2.4 million barrels a day and ranks 14th in global production. But if the oil companies “are reasonably successful in delivering on the commitments we’ve made, it is quite likely we will see Iraq increase its production to around 10 million barrels per day within about 10 years,” Tony Hayward, chief executive of BP, told the World Economic Forum in Davos, Switzerland, earlier this year.

Saudi Arabia’s production of 10.7 million barrels a day in 2008, declined slightly last year, but with 266 billion barrels in proven reserves, the Saudis have more oil than anybody. Iraq ranks fourth, behind Canada and Iran, with 115 billion barrels in proven reserves, but this figure dates from the 1970s and most industry experts believe that, with new technology, there is a lot more oil to be found and that it will be relatively easy to bring online.

The deals that Iraq signed with the major oil companies are long-term service contracts that will pay the companies a fee, generally ranging from a dollar or two per barrel, for each barrel they produce above an agreed minimum.

“The deal which was reached is major benchmark for the Maliki government. It is the one ‘ace in the hole’ many of the Iraqi people believe they have,” said Thomas Donovan, an attorney with the Iraq Law Alliance who has followed the process closely.

Shahristani, the oil minister, is generally credited with driving a hard bargain in his dealings with the oil companies. At least that’s the prevailing view among oil industry experts, but it is a view not universally shared by the Iraqi people, especially in the midst of a heated election campaign.

Iraq is in dire need of oil revenues and it has no way of rebuilding its devastated oil sector on its own. But the notion of handing control of the nation’s oil resources to foreign companies is something that “runs against the grain” of many Iraqis, warned Tariq Shafiq in a recent essay published in The Iraq Oil Report.

Shafiq was a founding director of the Iraq National Oil Co., which controlled the country’s oil resources from 1966 until it was scrapped by Saddam Hussein a decade ago.

Even if Maliki wins the election, the applecart could still be upset by a lawsuit that is now wending its way through the Iraqi courts. The suit, brought by a member of parliament, challenges the authority of Maliki and Shahristani to unilaterally negotiate the contracts. Under Iraq’s Baath-era oil law, which still stands, the contracts need parliamentary approval.

Donovan, the lawyer, said the legal process, thus far, has been an encouraging sign that the rule of law is taking root in Iraq. The government is responding to the challenge with briefs and counter-arguments rather than “violence and retribution,” he said.

The oil companies are following the case closely, but have not yet filed any briefs in the case.

“They may be involved in the appeal regardless of the decision,” Donovan said. “They are all playing their cards very close to their chest.”

Another lingering concern is the dispute over control of reserves in the semiautonomous Kurdish region. The Maliki government has refused to recognize the contracts signed by more than two dozen foreign oil companies with the Kurdistan Regional Government.

Although the U.S. government does not like to mix guns and oil, the two are inextricably linked in Sunday’s vote. If Iraq is deemed safe and stable enough for foreign oil companies to start operations in Iraq, it is likely that the Obama administration will be able to keep its promise to withdraw all combat troops by the end of August.

Current planning calls for about 50,000 troops to remain in Iraq after the deadline as non-combat advisors and trainers and to help with civilian projects. They are expected to stay through 2011.

U.S. troops have played a role in restoring a semblance of order to Iraq, but it is the prospect of finally cashing in on the vast wealth beneath Iraq’s soil that is perhaps the strongest incentive for the Iraqi people to set aside sectarian grievances and unite behind their elected government.