The deal on the top government posts brings together Shiites, Sunnis and Kurds in a power-sharing arrangement that could help forestall a slide back into Shiite-Sunni bloodshed that raged after the 2003 US-led invasion which ousted Sunni dictator Saddam Hussein.
Sunnis might have reacted with widespread anger had the Sunni-backed Iraqiya alliance of former Prime Minister Iyad Allawi been totally excluded from government.
Some may still feel cheated of power because of Maliki’s expected return as prime minister.
The deal will see Kurd Jalal Talabani retain the presidency and give a top Sunni politician from Allawi’s bloc the speaker post in parliament and other Iraqiya members cabinet jobs. Allawi himself will head a council of strategic policies.
“Thank God last night we made a big achievement, which is considered a victory for all Iraqis,” Kurdish regional president Masoud Barzani said at a news conference.
OPEC producer Iraq, trying to rebuild its oil industry after decades of war and economic sanctions and to quell a stubborn Sunni Islamist insurgency, has been without a new government since a March 7 election that failed to produce a clear winner.
“The most important issue now is that we are out of the bottleneck,” said Amer Al-Fayyadh, the dean of political science at Baghdad University.
“The formation of a government is now in sight.”
Lawmakers were scheduled to meet later on Thursday in only the second parliamentary session since the election and should pick a speaker, the next step toward a new government.
But in a harbinger of potential hurdles still to come, Iraqiya officials said the bloc had not agreed on a candidate by midday and there was internal squabbling over the nominee.
Allawi pushed hard to displace Maliki as prime minister after Iraqiya won two more seats than Maliki’s coalition in the vote.
Allawi has said repeatedly that Sunni anger might have reinvigorated a weakened but still deadly insurgency had his alliance been sidelined.
Parliament was due to meet at 3 p.m. (1200 GMT), outgoing Deputy Prime Minister Ross Noor Shawis said on Wednesday.
Its first task will be to elect a speaker and two deputies. It must then pick a president who in turn nominates a prime minister from the largest bloc, who is given 30 days to form a government.
The division of the top posts along ethnosectarian lines was a reflection of the sharp divisions that define Iraq after more than seven years of warfare unleashed by the US invasion.
Washington formally ended combat in August but 50,000 US troops remain to advise and assist the nascent army and police ahead of a full withdrawal next year.
Overall violence has fallen sharply since the height of sectarian slaughter in 2006/07, but assassinations and bombings still occur many times a day, followed every few weeks by a major, devastating assault by insurgents in which dozens die.
Tensions mounted as Maliki and Allawi wrestled over power. Rockets and mortars were fired regularly at Baghdad’s fortified Green Zone district of government offices in the past few days, and insurgents killed dozens in an attack on a Catholic church and on Shiite areas of the capital.
Maliki’s return to office will likely enrage Sunni hard-liners, who abhor what they see as Iran’s influence over Iraq’s Shiite leaders and his Islamist background, and Sunni Islamist insurgents, who view Shiites as apostates.
While Iraq’s political squabbles and continuing violence has unsettled some foreign investors, global oil majors are working to crank up production in Iraq’s vast oilfields.
Officials hope to lift production capacity to 12 million barrels per day from the current 2.5 million, vaulting Iraq into the top echelon of world producers.