Updated

Hopes for the quick formation of a new Iraqi government were dashed Tuesday when the first session of parliament failed to make progress and was forced to disband after less than two hours when minority Sunnis and Kurds walked out.

The deadlock came as a militant offensive grinds on in large parts of Iraq and neighboring Syria and the United Nations said civilian casualties set a record high in June.

Over the past three weeks, fighters from the Al Qaeda breakaway group Islamic State of Iraq and the Levant have spearheaded the offensive that has plunged Iraq into its deepest crisis since the last U.S. troops left in 2011.

The Sunni militant group's advance appears to have crested, at least for now, as it bumps up against majority Shiite areas, and as it seeks to consolidate its control of the large chunk of territory already in hand.

The militant onslaught, which has tapped into deep-seated grievances among the country's Sunni minority with Prime Minister Nouri al-Maliki's Shiite-led government, has made the formation of a new government that can hold the country together and confront the threat a pressing concern.

Acting speaker Mahdi al-Hafidh ended the proceedings after most of the 328-member legislature's Sunni and Kurdish lawmakers did not return following a short break, depriving parliament of a quorum. The entire session, from the opening national anthem to al-Hafidh's final words, lasted less than two hours.

The impasse, which was largely expected despite intense political pressure to make a quick deal, prolongs what has already been days of intense jockeying as political blocs try to decide on a new prime minister, president and speaker of parliament. The country's top Shiite cleric, Grand Ayatollah Ali al-Sistani, urged lawmakers last week to agree on the three posts before Tuesday's meeting in hopes of averting months of wrangling that could further destabilize the country.

The main sticking point is the job of prime minister, which holds the main levers of power. Under an informal system that took hold after the 2003 U.S.-led invasion, Iraq's prime minister is chosen from the Shiite community, the president from the Kurdish minority and the speaker of parliament from the Sunni community.

Al-Maliki, who has held the post since 2006, has come under intense pressure to step aside. Sunnis and Kurds, both of whom accuse al-Maliki of breaking promising and attempting to monopolize power, are demanding that he be replaced.

But al-Maliki has shown no willingness publicly to step aside. His bloc won the most votes in April elections, which traditionally would give him first crack at forming a new government. The current crisis in Iraq, however, has altered political calculations, and many of al-Maliki's former allies, and even key patron Iran, have begun exploring alternatives to replace him.

Still, al-Maliki has a track-record of outmaneuvering his rivals in the past to retain power, and he is nothing if not a political survivor. At the same time, he needs allies to keep his job, setting the stage for what could be a drawn-out negotiation process.

Sunni lawmaker Hamid al-Mutlaq said the Sunnis walked out of Tuesday's parliament session because they feel they need more time to reach a "serious understanding with others on how to run this country and change the course that has led the country to the current disaster."

"We do not want only to discuss the distribution of posts and the names of the candidates. Rather, we think we need to discuss how to change the behavior of the failing government," al-Mutlaq said. "We did not want to give some people the chance to make the parliament session as a race for posts. The fate of the country is more important that the post trophies or the names of possible candidates."

The tensions have also brought to the fore the deeper fissures that run through Iraq, including among its sectarian and ethnic groups — even in parliament.

Before the brief session concluded, Kurdish lawmaker Najiba Najib called upon the government to end "the embargo imposed on Kurdistan region which did not receive its share in the budget since February."

Then as the lawmakers filed out, a Shiite lawmaker from the al-Maliki bloc, Khazim al-Sayadi, shouted: "We will crush with our shoes the heads of those who downed the Iraqi flag," apparently referring to the Kurdish forces, known as peshmerga,

Those forces have moved into disputed territories south of their autonomous zone after security collapses amid the militant offensive.

The self-ruling northern Kurdish region and central government in Baghdad have been at loggerheads over a range of issues, key among them the city of Kirkuk and rights to develop natural resources. Since 2003 U.S.-led invasion, the Kurds have signed more than 50 energy deals with western and regional companies without Baghdad's consent, which in return deems them as illegal.

The need for a new government that can keep the country together is urgent following the recent offensive spearheaded by the Islamic State of Iraq and the Levant, an al-Qaida breakaway group that has overrun much of northern and western Iraq.

The threat posed to Iraq by the recent militant offensive was underlined by new casualty figures released Tuesday by the United Nations that put June's death toll at 2,417 — making it the deadliest month so far this year.

The figures issued by the U.N. mission to Iraq include 1,531 civilians and 886 security forces. UNAMI added that 2,287 Iraqis, including 1,763 civilians, were wounded.

The figures exclude deaths in embattled Anbar province, which is largely controlled by Sunni militants.

The second deadliest month this year was May, with 799 Iraqis killed, including 603 civilians. April's death toll was 750.

The latest casualty figures exceed even last year's peak. The U.N. reported that last July at least 1,057 Iraqis were killed and another 2,326 were wounded.

"The staggering number of civilian casualties in one month points to the urgent need for all to ensure that civilians are protected," the U.N. Special Representative in Iraq, Nickolay Mladenov, said in the statement.

Mladenov called on Iraqi political rivals to "work together to foil attempts to destroy the social fabric of Iraqi society."