BAGHDAD — Iraqi lawmakers gathered Thursday to vote on filling senior leadership posts in the first step to forming a new government, after a breakthrough deal that returns Shiite Prime Minister Nouri al-Maliki to office for a second term but fell short of Sunni hopes for greater political power.

The deal reached late Wednesday breaks eight months of deadlock, but raises concerns that Sunnis disillusioned with the political process could return to the ranks of the insurgency, fueling new violence as the United States prepares to remove the last of its troops from the country by the end of next year.

The deal is potentially a setback for the U.S., which had been pushing for a greater Sunni say in power, and a boost for regional rival Iran. The Sunni minority had put great hopes in the March elections and succeeded in lifting their bloc to a hair’s-breadth victory, only to be outmaneuvered by Iranian-allied Shiites who preserved their domination of the new government.

Parliament was expected to start a session later today to take the first formal step in creating the new government – likely electing a parliament speaker, two deputies and then the president. The session was delayed repeatedly during the day, but multiple lawmakers already gathered at the scene said they still expected it to be held Thursday evening.

A vote on the full government could still take several weeks, as the factions work out details. Massoud Barzani, president of Iraq’s autonomous Kurdish region said he expected a new government to be in place within a month.

A Sunni-backed coalition led by former Prime Minister Ayad Allawi won the most seats in the March 7 parliament elections, but a majority of religious Shiite parties were able to put together enough seats to force Allawi to make a deal, thwarting his bids for both the prime minister job and the presidency.

Instead, Allawi will lead a newly created council to oversee issues of security and foreign policy. But the council’s powers remain vague: 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.

“I don’t think we got what we wanted. We are the biggest bloc, and we won the election,” said a lawmaker from Allawi’s Iraqiya party, Jaber al-Jaberi, of the Sunni stronghold Ramadi. “We earned the right to form the government. However, there were powerful forces … and we compromised.”

The Sunnis did get a few consolation prizes, and the United States praised the fact that the new government would have at least some Sunni presence.

“The apparent agreement to form an inclusive government is a big step forward for Iraq,” said Tony Blinken, national security adviser to Vice President Joe Biden, the administration’s point man for Iraq.

Barzani praised the deal, calling it fair to all blocs. “We cannot expect that any block gets everything,” he said. There was no immediate comment from Allawi. According to media reports, Allawi, al-Maliki and Barzani met today, but there was no confirmation of the meeting.

The deal preserves the sectarian breakdown of positions that has held since the first elected government in 2005: Shiites hold the prime ministry, Sunnis the parliament speaker, and the Kurds the presidency. President Jalal Talabani was expected to be elected to a second term.

But it leaves unresolved the sectarian wounds that have bloodied the country since Saddam Hussein was toppled in the 2003 U.S.-led invasion. His fall ended the political domination of the country by the Sunni minority and established domination by the Shiite majority. Sunnis responded by becoming the backbone of the insurgency against the government, sparking vicious Shiite-Sunni violence that nearly pushed the country into civil war.

With the insurgency eased since 2008, the Americans had hoped the election could create a new sectarian political balance to ensure stability as U.S. troops withdraw from Iraq. Sunnis turned out in droves for the March election and endured purges of their candidates. In Sunni neighborhoods when the results were announced, there was dancing in the streets and celebratory gunfire.

The drawn-out wrangling over the government left a political void that many feared was fueling new bloody attacks by Sunni insurgents and al-Qaida’s branch in the country.

Now the question is whether Sunnis will support the new government – or be tempted to turn back to the insurgency. Many Sunnis will likely look at the result as the will of neighboring Shiite-majority Iran, which they believe seeks to wield influence over Iraq and sideline Sunnis.

The extent of Sunni power in the new government will not become clear until the allocation of ministry posts is announced – and the powers of the council Allawi is to head are defined and approved by parliament.

An Iraqiya lawmaker said the council would be a 20-member body including the prime minister but headed by Allawi. Falah al-Nakeed 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 implied that was not the case, setting the stage for further battles.

The Sunnis’ 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 and the Kurds’ dominance in the north. In contrast, an earlier Sunni defense minister was an independent with no party backing and less authority that his title would suggest.

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 aligned in September with the Sadrists, a key alliance to getting the prime minister the majority he needed to keep 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.

“We think that the first decision the government should take is to change some ineffective military commanders and purge the security forces of corrupt members,” he said.

A direct role by the Sadrists in the security apparatus would likely severely curtail American support of Iraq’s fledgling forces. The U.S. and the Sadrists do not have any contact, and the Sadrists consider the Americans to be an occupying power. Members of al-Sadr’s militia, the Mahdi Army, have attacked American troops, and were one of the main players behind sectarian violence.

Iraqiya lawmakers said they won a concession to get rid of a law helping purge members of Hussein’s former regime from government posts in two years. The so-called De-Baathification law was reviled by Sunnis who felt it was a thinly veiled attempt to keep them out of positions of influence.

Al-Jaberi said that with the council and the end of the De-Baathification law, the Shiites “showed to us they want to open a new page.”

But he left open the possibility that Iraqiya could always withdraw its support for the government. “We can always change our minds. We have 91 seats in the parliament.”