Iraq's president gave Shiite Prime Minister Nouri al-Maliki the nod to form the next government Thursday after an eight-month deadlock, keeping him in his post despite a dramatic Sunni walkout from parliament, demonstrating the deep distrust between the two sides.

The walkout and the fact that it came just one day after an accord was forged to work together dealt a blow to hopes for a unified government -- especially one that ensures continued Shiite domination while giving Sunnis a role far short of the greater political power they seek.

Sunni support is crucial. The Americans had been pushing for them to have a significant role, fearing that otherwise, disillusioned Sunnis could turn to the insurgency, fueling new violence as the last of U.S. troops prepare to leave by the end of next year.

The power-sharing deal reached Wednesday night was heralded by some politicians as a breakthrough, ending the months of wrangling since the inconclusive March 7 parliament elections. But Sunnis were already accusing al-Maliki of not fulfilling promises and have warned they could pull out if they are not met.

At a press conference after the walkout, a lawmaker from the Sunni-backed Iraqiya bloc, Haider al-Mulla, did not answer when asked whether the bloc would participate in the government. Instead, he said Iraqiya would seek "explanations from al-Maliki and State of Law over their broken commitments."

The session was called so lawmakers could take the first formal steps toward forming the new government by naming senior leadership positions. It began with a show of unity, as al-Maliki and his top rival, Iraqiya's leader Ayad Allawi, sat next to each other in the chamber, smiling and chatting.

The first vote went smoothly, with a Sunni from Allawi's Iraqiya block, Osama al-Nujaifi, elected parliament speaker. But before the vote to elect a president, about 57 Iraqiya lawmakers walked out. They had demanded that lawmakers first vote to reverse a ban on three of the blocs' members by a committee charged with rooting out members of Saddam Hussein's regime from government posts. Their demand was rejected.

Iraqiya lawmakers have said that as part of the power-sharing deal, the other factions agreed to get rid of the controversial De-Baathification law entirely within two years. Sunnis view the De-Baathification process as a thinly veiled Shiite attempt to bar Sunnis from returning to power.

Despite the walkout -- which Allawi joined -- lawmakers proceeded with the session and elected Kurdish leader Jalal Talabani as president for a second term. Talabani addressed the lawmakers remaining in the parliament hall, declaring: "Today is a day of victory, the victory of the free Iraqi will."

He then formally requested al-Maliki form a new government. Al-Maliki has 30 days to do so, as the factions work out the allotment of ministry positions, including key posts like foreign affairs and the interior ministry in charge of security forces.

A Shiite lawmaker from al-Maliki's alliance said the walkout was a surprise and emphasizes the suspicions that still define relations between Shiites and Sunnis who used to fight out their political differences on the streets with guns. But with or without Iraqiya, the political process would go on, he said.

"We have a parliament, an elected president and a candidate to form a government. There is no way back," said Abdul-Hadi al-Hassani.

The Sunni minority had put great hopes in the March elections and succeeded in lifting their bloc to a narrow victory: Allawi's Sunni-backed Iraqiya coalition won the most seats in the March elections, but not a majority. Al-Maliki, whose State of Law party came in second, cobbled together alliances with Iranian-backed religious Shiite parties, gathering enough seats to thwart Allawi's bids for either the prime minister job and the presidency.

Instead, Allawi is to lead a newly created council to oversee issues of security and foreign policy. But the council's powers remain vague, and already there were signs of a fight brewing over the extent of its authority.

Iraqiya lawmaker Falah al-Nakeed said the council would be a 20-member body including the prime minister but headed by Allawi. He said all strategic decisions over security, foreign policy and anything concerning the "destiny" of the country, would have to be passed unanimously by the council.

"It will be a real check on al-Maliki's power," al-Nakeed said.

But lawmakers from al-Maliki's State of Law bloc implied that was not the case. Al-Maliki is unlikely to give up the reins over security issues, and one of his key Shiite partners -- the staunchly anti-American Sadrist movement -- also appears to be angling for a hand as well

The extent of Sunni power in the new government will not become clear until the allocation of ministry posts is announced. But their weight in the government will depend on other factors as well. Power in Iraq is often determined not just by formal roles but by the personalities of the individuals and their party backing.

The presidency, for example, is largely a ceremonial job, but Talabani has been able to wield considerable power because of his background as a longtime Kurdish leader.

Allawi has been criticized for his lack of participation in the previous parliament, preferring instead to spend time at his London house. For his council to have any weight, Allawi would have to play a vigorous and daily role.

The new government could also give a significant role to the Sadrist movement, led by anti-American cleric Muqtada al-Sadr, who has grown closer to Iran. Al-Maliki's alliance with the Sadrists was key to keeping him in power.

Sadrist lawmaker Hakim al-Zamili, said they have yet to discuss details of ministry positions. But he said the first thing to do was a shake-up of the security services, raising the prospect that Sadrists seek positions there.