BAGHDAD - Iraq' president is expected Thursday to formally ask incumbent Prime Minister Nouri al-Maliki to form the next government, an official in the president's office said. The long-awaited announcement is part of a deal to end an eight-month deadlock over who would lead the country following the inconclusive March 7 elections, and sets in motion a 30-day timeline for al-Maliki to accomplish the challenging task of forming his Cabinet. The new government is expected to include all the major factions, including the Kurds, Shiite political parties aligned with Iran and a Sunni-backed bloc that believes it should have been the one leading the next government. Al-Maliki will have to find substantial roles for all of those factions or risk having them leave his government, a possibly destabilizing blow for Iraq's still fragile democracy. The announcement Thursday is largely a formality, coming after President Jalal Talabani was elected on Nov. 11 and at the time publicly asked al-Maliki to form the next government. Talabani then had 15 days in which to formally extend the offer, giving al-Maliki some extra time to work out the details. The announcement will also underscore what has been a stunning comeback for al-Maliki, whose State of Law coalition came in second in the March election to the Sunni-backed bloc led by former prime minister Ayad Allawi. But neither bloc gained the 163-seat majority necessary to govern, which translated into an intensive period of political jockeying. As the political discussions dragged on, so did violence, raising concerns that insurgents were trying to exploit the political vacuum to bring about more sectarian violence. Allawi and his Iraqiya coalition were never able to gather enough support from Iraq's political parties, which are still defined largely by their sectarian allegiances. Although Allawi himself is a Shiite, his largely Sunni coalition was viewed with suspicion by many in Iraq's political scene who still harbor deep resentment over the Sunni-dominant government that ruled Iraq under Saddam Hussein and worry about Sunnis returning to power. That left al-Maliki, who in the end managed to pull together support from fellow Shiite political parties and the Kurds that propelled him toward a second term. One of the most closely-watched developments will be what posts al-Maliki gives to Iraqiya. If the Sunni population believes it is blocked out of key posts and effectively kept from a meaningful role in government, it could risk a return to the sectarian violence that once ripped Iraq apart. Al-Maliki will also have to weigh what role to give to followers of anti-American cleric Muqtada al-Sadr. The Shiite cleric's support for al-Maliki back in September was a result of pressure from neighboring Iran and is considered a key turning point in sending al-Maliki back to the prime minister's office. But the Sadrists' anti-American stance, ties to Iran and their disturbing history as one of the major players in the country's sectarian violence, poses challenges about what cabinet posts to give them. Thursday's ceremony is expected to take place at Talabani's office, said the official, who spoke on condition of anonymity because he is not authorized to speak to the media.