Updated at 5:26 p.m. ET
A jubilant Ayad Allawi claimed victory for his secular, anti-Iranian coalition as final parliamentary returns Friday showed him edging out the bloc of Prime Minister Nouri al-Maliki, who angrily vowed to fight the results.
The results, if they stand, will give Allawi the first opportunity to form a parliamentary majority and Iraq's next government. But they do not automatically mean that he will become prime minister, and the narrow margin sets the stage for months of political wrangling.
"On this occasion, I'd like to congratulate the Iraqi people and extend the hand of friendship to all neighboring and world countries," said Allawi, a secular Shiite politician and former prime minister who appealed across sectarian lines to minority Sunnis who have been out of power since the downfall of Saddam Hussein.
In comments to cheering supporters at his Baghdad headquarters, he spoke of his desire to help build a stable region that would help "achieve prosperity for (Iraq's) people."
Baghdad's Sunni neighborhoods, the site of vicious sectarian fighting just a few years ago, erupted in cheering, honking of horns and celebratory gunfire in support of the man whom they have endorsed as their own.
"Today is a historic and joyful day which will witness a change for the sake of Iraqi people," said Hameed Marouf, an Allawi supporter in Azamiyah.
Regardless of who eventually comes out on top, the results of the March 7 elections suggest that millions of Iraqis are fed up with a political system that revolves around membership in one of the two major Islamic sects.
They also show that Iraqis - both Shiite and Sunni - are suspicious of Iranian influence. Allawi was widely seen as closer to the region's Arab governments than to neighboring Shiite Iran.
The next prime minister will lead a government that presumably will be in power when the U.S. completes its scheduled troop withdrawal from Iraq next year. There has been fear among some in the West that a U.S. withdrawal would effectively leave Iraq as an Iranian puppet.
Al-Maliki, the U.S. partner in Iraq for the past four years, announced in a nationally televised news conference that he would not accept the results, which gave his bloc 89 seats to Allawi's 91 in Iraq's 325-seat parliament.
Gesturing angrily, he said he would challenge the vote count through what he described as legal process. By law, he would have until Monday to register his complaints with the election commission.
After the complaints are addressed by the election commission, the results may be revised and then finally submitted to the country's Supreme Court, which must ratify them. The entire process could take weeks.
Al-Maliki and his supporters in his State of Law coalition had previously called for a re-count, saying there had been instances of vote rigging and fraud. But election officials had refused, and international observers have said the election was fair and credible.
The top U.N. official in Iraq, Ad Melkert, called on all sides to accept the results. That sentiment was echoed by U.S. Ambassador Christopher R. Hill and Gen. Ray Odierno, the top U.S. military official in Iraq, who praised what they described as a "historic electoral process," and said they support the finding of election observers who found no evidence of widespread or serious fraud.
The news represents a spectacular turnaround for Allawi, a doctor who has spent much of his life in London as a leading member of the opposition to Saddam's regime.
He served as the U.S.-appointed prime minister in Iraq from 2004 to 2005. During that time he won enemies for his backing of U.S. military campaigns in both the Sunni stronghold of Fallujah and the Shiite town of Najaf - although more recently, many have praised his stand as a sign of his willingness to deal harshly with militant groups.
Allawi's path to a coalition government is anything but assured. He will face significant challenges finding allies who want to align with him.
For starters, many of his Sunni backers are anathema to the country's Kurdish population, who are considered key to any coalition. The Kurds have often clashed with Sunni Arabs in disputed territories that the Kurds claim stretching from the Syrian border to the Iranian border.
In the northern Ninevah province, one of Allawi's main backers - Osama al-Nujaifi - is viewed with almost vitriolic hatred by Kurds, who might lobby for Allawi to dump him and others before they would consider joining his coalition.
Many Shiites also view Allawi's Sunni allies as little more than Saddam-era holdovers hoping for a return to the Baathist regime who once ruled the country.
His attempts to run on his own merits failed miserably during the last parliamentary elections in December 2005, when his U.S.-supported alliance was trounced. But Allawi, who once fought off an assassination attempt by a machete-wielding assailant believed to be sent by Saddam, has shown a keen instinct for political survival.
In the current campaign, Allawi's bloc provided a stark contrast to the religious orientation of the two large, Shiite-led coalitions led by the Iranian-backed Supreme Islamic Iraqi Council, or SIIC, and al-Maliki's Dawa Party. His political rallies were Western in style, with music and dancing - a contract with the more sober rallies for the religious parties.
Al-Maliki campaigned with all the benefits of incumbency: easy air time on national TV, the ability to dole out favors to local officials in exchange for their support, and a record of helping stop some of the country's violence.
The prime minister, known as a hardline Shiite during his first couple of years in power, has more recently transformed himself into a law-and-order nationalist who has occasionally reached out to Sunnis, who make up about 15-20 percent of Iraqi's population.
While trying to re-establish a strong central government - most notably by routing a Shiite militia that ruled parts of Baghdad and Iraq's second-largest city, Basra - al-Maliki has also alienated many key constituencies by governing with a heavy hand. His support for a ban of hundreds of candidates with alleged ties to Saddam's regime severely undercut any support he had from Sunnis, who felt the ban unfairly targeted their candidates.
Friday's results were based on numbers released by the election commission and compiled by The Associated Press. The commission released the seat allocation by province but did not include an overall number of seats won.
Allawi fared well in provinces with significant Sunni populations such as Ninewah, Anbar, Salaheddin, and Kirkuk, while al-Maliki won more support in areas with significant Shiite populations such as Baghdad, and much of the Shiite south.
Significantly, though, Allawi did better in Shiite areas than al-Maliki did in Sunni regions. Allawi managed to win three seats in the southern province of Basra, for example. That proved key to his victory.
Hours before the results were announced, two bombings near a restaurant in a city north of Baghdad killed at least 40 people - a harbinger of a spike in violence that many Iraqis fear could accompany lengthy negotiations on forming a coalition government.
An increase in attacks could complicate U.S. plans to reduce troop levels from 95,000 to 50,000 by the end of August. All U.S. forces are slated to leave Iraq by the end of 2011.