The March 7 vote for a 325-seat parliament has reshaped a fractured Iraqi political landscape which is likely to undergo further shifts in tough coalition bargaining that lies ahead. Maliki's State of Law coalition leads in seven of Iraq's 18 provinces, with Allawi's Iraqiya list ahead in five. The Iraqi National Alliance (INA), dominated by Shi'ite Islamist factions, and a Kurdish alliance are each in front in three provinces.
The Kurdish alliance was slightly behind Iraqiya in the disputed city of Kirkuk, while Goran, a Kurdish reform movement, eroded its hegemony in the autonomous northern Kurdistan region.
The overall picture is incomplete, with results released so far representing just over a quarter of 12 million votes cast, and may change, particularly in Baghdad and Kirkuk.
But politicians hoping to govern Iraq as U.S. troops prepare to leave are already jostling for possible coalition partners.
Maliki's potential allies include INA, led by the Shi'ite Supreme Islamic Iraqi Council (ISCI), and the Kurdish parties, as well as Iraqiya. But these groups might join forces to thwart his return to power. Rival blocs may dissolve and re-form. It's going to be another wild ride to see which way it goes, said David Newton, a former U.S. envoy to Iraq. Iraqis seem to be able to solve things at 10 minutes after midnight.
He said Sunnis would take it very badly if Maliki moved toward ISCI -- viewed by many of them as a proxy of Iran. They favour Allawi, a secular Shi'ite who led a transitional 2004-05 government and who looks poised to be a major player again.
Yahya al-Kubaisy, a researcher at the Iraq Institute for Strategic Studies, said a government excluding Iraqiya risked fuelling resentment felt by the Sunni minority since the 2003 U.S.-led invasion ended its entrenched grip on power.
If this happens, we must expect a return of violence to Iraq, he said.
A bloody Sunni insurgency against U.S. and Iraqi troops only calmed after local tribes turned against al Qaeda Islamists, joining forces with a ramped-up U.S. military presence.
Maliki based his re-election campaign partly on improved security after the sectarian carnage of 2006-07, and on plans for reconstruction to be funded from oil deals his government signed with foreign firms to unlock Iraq's vast energy wealth.
His message struck a chord with many voters in Baghdad despite a series of deadly bombings by al Qaeda-linked militants that has hit government targets in the capital since August.
Maliki is doing fantastically well in Baghdad and most places south of it, but dismally in (Sunni-dominated areas) to the north of the Iraqi capital, said Iraq expert Reidar Visser.
Iraq could wind up with a prime minister whose party had won only one or two percent of the vote in the Sunni heartland of Anbar and the volatile northern province of Mosul, he said.
Allawi is doing better in Shi'ite areas than Maliki is doing in Sunni areas, but he may get a smaller total number of deputies and will therefore need more coalition partners to form a government, Visser argued.
He said Maliki's support for a pre-election move to bar hundreds of candidates for alleged links to Saddam Hussein's now outlawed Baath party had alienated many Sunnis. The de-Baathification campaign has clearly reduced his ability to rise above sectarianism and act as a national leader.
Toby Dodge, an Iraq expert at Queen Mary, University of London, predicted that Maliki would rely on Shi'ite support in his quest for a coalition that could keep him in power, rather than on some form of cross-sectarian nationalism.
Given his behaviour during the campaign, I would bet on sectarianism and some form of alliance with all or elements of INA, Dodge said, referring to Maliki's Shi'ite former allies.
Maliki far outpolled INA in the southern oil city of Basra, where he sent troops to combat Shi'ite militia in 2008.
Aqil Abdul Hussein, a Basra University professor, said the results so far were predictable. They reflect the feelings of Basra residents, who have taken note of progress and security improvements over the past two years.
The vote in Kirkuk, where Allawi's list edged ahead, could damage the longstanding Kurdish claim that the oil city belongs to Kurdistan -- although the Kurds are sure to try to use coalition bargaining to wrest concessions on the issue.
Iraqi President Jalal Talabani's Patriotic Union of Kurdistan (PUK) and Kurdish President Masoud Barzani's Kurdistan Democratic Party (KDP) faced an unprecedented challenge to their hold on the Kurdish vote from the reform-minded Goran group.
Khaled Suleiman, an analyst in northern Iraq, said the Kurds would speak with one voice in Baghdad, despite the rise of Goran, especially on issues related to Kurdish destiny such as recovering Kirkuk and the issue of Peshmerga (Kurdish forces).
He said the Kurds would again play kingmakers in Iraqi national politics. No government can be formed without Kurds. (Additional reporting by the Baghdad bureau; editing by Robin Pomeroy)