The United States is facing a decisive political defeat in Iraq over the formation of a new government, as its influence in the country sinks lower than at any time since the invasion of 2003.
The increased power of Iran is expected to be underlined with a vote in parliament today in Baghdad to name the leadership after eight months of political stalemate during which political violence has continued throughout the country.
The US campaign to promote its favoured candidate, Iyad Allawi, as president appears to have failed spectacularly. Mr Allawi's al-Iraqiya party, which won most seats in the election on 7 March, is breaking up as several of its factions join the government.
President Barack Obama, Vice-President Joe Biden and Senator John McCain, who is in Baghdad leading a congressional delegation, all lobbied the Kurdish leaders to give up the post of President but without success. The incumbent, Kurdish leader Jalal Talabani, and Prime Minister Nouri al-Maliki are expected to be re-elected as the country's leaders.
Dr Mahmoud Othman, a senior Kurdish leader and MP, said by phone from Baghdad yesterday there is "severe American pressure on us until now to give up the presidency", but said so far the Kurds had resisted it.
The US still has 50,000 troops in Iraq, but Mr Obama has made it clear that he intends to withdraw all of them. "American hegemony in Iraq is over," Ghassan al-Attiyah, a commentator and political scientist, said. "US influence is falling by the day."
Iraqi sources say the powerful job of Speaker of parliament is likely to go to Osama al-Nujaifi, a Sunni member of al-Iraqiya, who, along with his brother, controls the northern city of Mosul. Kamran Karadaghi, a veteran Kurdish journalist and a former chief of staff for President Talabani, said: "I expect Talabani to be President, Maliki to be Prime Minister and Nujaifi Speaker of parliament."
He added that American pressure on the Kurds to give up the presidency to the Sunni had been deeply resented and counter-productive; the Kurds have been closely allied with the US.
Mr Allawi, who was Prime Minister of Iraq at the height of the American occupation in 2004-05, appears to have overplayed his hand. His al-Iraqiyah party, strongly backed by Turkey, Saudi Arabia and Jordan, won 91 of 325 seats in the Iraqi parliament in March. The State of Law bloc of Mr Maliki won 89 seats, the Shia religious parties, grouped in the Iraqi National Alliance, a further 70 seats, and the Kurds some 57 seats.
A secular Shia himself, Mr Allawi's voters were mostly Sunni and his al-Iraqiya party was always divided. He also seems to have exaggerated the ability of the US and the Sunni Arab states to make him prime minister or president. Influential Sunni politicians such as Mr Nujaifi, who is believed to control 20 MPs, has made no secret in recent days about his wish to be part of a power-sharing government. Dropping his previous opposition to Mr Maliki, he said earlier this week of his party that "there are signs of a deal".
The Speaker in the Iraqi parliament has a powerful and high-profile position, since he calls parliament into session and largely controls its work. If Mr Nujaifi gets the job this may go some way to satisfying the Sunni demand for a share in government. A former Industry Minister, he and his brother Atheel took control of Mosul, Iraq's third-largest city with a population of 1.7 million, during provincial elections in 2009. They have been at daggers drawn with the Kurds in and around Mosul, but have reached an understanding with the Kurdish leadership.
Private talks between Mr Maliki and Sunni leaders were happening yesterday afternoon, but the Prime Minister appears certain of re-appointment.
Mr Attiyah said: "It is unbelievable how he has won the support of all those, like the Kurds, Sadrists, Iranians and others who wanted to get rid of him after the election."
His main strength has probably been that there was no obvious candidate on the Shia side able to replace him. Iran has outmanoeuvred the US in shaping the new government to its own liking.
Along with its ally, Syria, Iran has shown flexibility in dropping its earlier opposition to Mr Maliki and persuading the followers of the nationalist Shia cleric, Muqtada al-Sadr, who did well in the Iraqi election, to do the same. It thereby reunited the Shia coalition which, with the Kurds, has ruled Iraq since 2005. The only Shia party left out is the Islamic Supreme Council of Iraq, once seen as an Iranian pawn.