DUBAI, United Arab Emirates — Now that the votes have been counted, the first big test facing Iraq’s fragile democracy is whether it can make the transition from one administration to the next without too much bloodshed or violence.

If this weekend's horrific sectarian slaughter and suicide bombings are any harbinger, things aren't looking good. But there will also come another test: whether the lucrative oil deals negotiated by the previous administration can survive the transition.

After a spectacularly successful auction of drilling rights last December, Prime Minister Nouri al-Maliki’s government spent the first few months of this year putting the finishing touches on 10 separate deals that, if implemented successfully, could see Iraq challenging Saudi Arabia as the world’s leading producer within the decade.

By any measure, these deals were the singular accomplishment of Maliki’s tenure. Oil Minister Hussain al-Shahristani earned the respect of the international oil community for driving a very hard bargain and delivering a deal that should quickly put his nation on the path to prosperity.

But in Iraq’s fevered political climate, no deal makes everyone happy, and the oil contracts could easily become a casualty as Iyad Allawi, the declared winner in last month’s election, begins the messy process of stitching together a governing coalition.

“The Maliki government did everything in their power to make sure those contracts would survive. They fast-forwarded the effective date of many of the contracts ... [and] they also had the contracts ratified by the Council of Ministers very quickly. Whether these actions are enough will be the main question,” said Thomas Donovan, an attorney with the Iraq Law Alliance, who has followed the process closely.

“My sense is that they will survive the challenge, and that they will last throughout the next transitional government and any government thereafter,” he said.

That is what some of the world’s largest oil companies — Exxon Mobil, BP, Royal Dutch Shell, Russia’s Lukoil and others — are banking on as they bet billions on Iraq’s ability to provide a politically stable and physically secure environment for them to go about their business.

And it is a gamble, says Giacomo Luciani, an oil industry scholar at the Gulf Research Center in Geneva.

“At the moment, we don’t know what’s going to happen. But we do know that the oil contracts are the main source of power, the main source of money, the main source of everything in Iraq,” Luciani said.

“We have to see what kind of coalition emerges and whether it finds it tactically convenient to raise objections to the oil deals,” he said.

Iraq nationalized oil production in 1961, and thereafter the notion of keeping Iraq’s oil under Iraqi control has played well for nationalist politicians from Saddam Hussein to today’s crop of Sunni and Shiite rivals. The reality, however, is that the dilapidation of Iraq’s oil fields that resulted from years of war and sanctions can only be repaired by a massive influx of capital and technology from international oil companies.

And Shahristani, the oil minister, can hardly be accused of giving away the store when he auctioned off the rights to develop some of Iraq’s prize oil patches. The successful bidders signed 20-year service contracts that will pay them a relatively modest per-barrel fee for each barrel they produce above an agreed minimum.

“He [Shahristani] obtained a very good deal for Iraq, but that doesn’t mean the deal will be confirmed. You are assuming that everyone is pursuing Iraq’s national interest, and that might not be the case,” said Luciani.

“In principle, I don’t think there’s a prejudice against foreign companies’ involvement. But one can see how it becomes part of someone’s political agenda,” he said.

Another major worry is security. With the U.S. planning to reduce the number of troops in Iraq to 50,000 by the end of August, and to effect a complete withdrawal by the end of 2011, providing security for the oil companies will fall to the Iraqis.

The worry was highlighted two weeks ago when authorities in oil-rich Basra province found a small weapons cache and a note threatening foreign oil companies. The incident appeared to be more theater than threat, but security experts admit it is hard to gauge the level of grassroots mistrust of foreign oil companies and how this might be exploited by those wishing to destabilize the government.

Much will depend on the new government and its choice of oil minister, said Ben Lando, editor of the influential Iraq Oil Report.

Although Allawi, a former interim prime minister, has been declared the winner in the March 7 election, it is not clear if he will be able to pull together enough allies to form a governing coalition. Even less certain is who will get the job as oil minister.

Shahristani, a former nuclear scientist who spent time in Saddam’s prisons, is widely respected in oil circles and could be asked to stay on, no matter who leads the next government.

“Shahristani is definitely not out of contention, though any coalition with the Kurds involved drastically reduces his chances to the point of elimination.” said Lando.

That’s because of the ongoing dispute over control of reserves in the semi-autonomous Kurdish region. Shahristani has antagonized the Kurds by refusing to recognize the contracts signed by nearly two dozen foreign oil companies with the Kurdistan Regional Government.

Others who might be considered for the oil post include Thamir Ghadhban and Ibrahim Bahr al-Uloom. Both held the job previously and are known in the oil community.

Even the wily Ahmad Chalabi’s name has been mentioned. Chalalbi, famous for providing the Bush administration with dubious intelligence about Saddam’s weapons of mass destruction, served as interim oil minister for a few weeks in 2005. He is also Allawi’s cousin, although in their case blood does not appear to be thicker than oil.