BAGHDAD (Reuters) - Secularist challenger Iyad Allawi’s coalition won the most seats in Iraq’s election, according to preliminary results on Friday, but the tight race foreshadowed long, divisive talks to form a new government.

The cross-sectarian Iraqiya bloc headed by Allawi took 91 seats with the State of Law coalition led by Shi’ite Prime Minister Nuri al-Maliki close behind at 89 seats, a result that highlighted Iraq’s sectarian gulf following a vote Iraqis hoped would stabilize their country after years of war.

Allawi, a secular Shi’ite who served as prime minister in 2004-5 and was once highly critical of Shi’ite neighbor Iran for meddling in Iraq, said in brief comments on television that he would extend “hands and heart” to all groups.

“For all who want and wish to participate in building Iraq, we will together bury political sectarianism and political regionalism,” he said.

Nearly three weeks after the March 7 ballot, the preliminary results showed Maliki taking ethnically and religiously diverse Baghdad and predominantly Shi’ite southern provinces, while Allawi dominated largely Sunni northern and western regions.

Celebratory gunfire rang out in the streets of Baghdad after the results were announced.

The Iraqi National Alliance (INA), a Shi’ite bloc with close ties to Iran, was in third place with 70 seats, and the Kurdish alliance, a union of two powerful parties in Iraq’s semi-autonomous Kurdish north, finished with 43 seats.

The INA, an alliance which includes anti-American cleric Moqtada al-Sadr currently studying in Iran, is negotiating a merger with Maliki’s State of Law. Maliki said he was on the way to forming the biggest bloc in parliament.

But any attempt to sideline Allawi in what could be weeks or months of perilous negotiations to form a new government could lead to resentment among Sunnis shunted to the political wilderness when Iraq’s majority Shi’ites rose to power following the 2003 U.S.-led invasion that ousted Saddam Hussein.

Sectarian violence exploded after the last parliamentary vote in 2005 as politicians took more than five months to agree a government.

SADR THE KINGMAKER?

The United States congratulated Iraq for carrying out a successful election, noting neither international nor domestic observers had reported any signs of widespread or serious fraud.

“This marks a significant milestone in the ongoing democratic development of Iraq,” State Department spokesman P.J. Crowley said.

But Maliki said he believed the results were not final.

“For sure, we will not accept these results,” he told a news conference.

The results released on Friday represented a 100 percent preliminary count of the votes, but the final results must be certified by a court.

The potential power vacuum and likely instability during the coalition negotiations will be watched closely by Washington as the U.S. military prepares to end combat operations formally by September 1 and pull its troops out by the end of 2011, and also by global oil firms that inked multibillion-dollar contracts to refurbish Iraq’s rich but dilapidated oilfields.

Iraqi challenger Iyad Allawi speaks during an interview with Reuters in Beirut, March 19, 2010. REUTERS/Jamal Saidi

Underscoring Iraq’s fragile security and the tensions caused by the March 7 election, two explosions in the town of Khalis, in Iraq’s mainly Sunni northern Diyala province, killed at least 42 people and wounded 65 just before the release of the results.

The Sadrists’ strong election showing gives Sadr, a Shi’ite cleric whose Mehdi Army fiercely fought U.S. troops, a potential kingmaker role in the new parliament. Representatives of Maliki’s State of Law and the Sadrists travelled to Iran on Friday to meet with Sadr, according to INA sources.

While Maliki and INA are seen as having close ties to Iran, Allawi is viewed as having better relations with Arab states. He was once highly critical of Tehran for supporting Shi’ite militias in Iraq, but is reported to have sought to mend fences.

A merger of State of Law and INA would take the two blocs close to the 163 seats needed to form a government.

Such an alliance could leave Sunnis vulnerable after they turned out in force at the polls. Their participation was considered a key to Iraq’s future stability after the sectarian bloodshed that engulfed the country in 2006-07.

A merger could also leave Maliki exposed in his quest for a second term as prime minister. The Sadrists were infuriated when Maliki sent federal troops to crush their militias and authorities still hold hundreds of Sadrist prisoners.