The inaugural session of Iraq’s parliament collapsed Tuesday after heated exchanges and a walkout, dampening hopes that the country’s fractious politicians will rise to the challenge presented by the insurgency tearing their nation apart.

Sunni and Kurdish lawmakers left the at times chaotic meeting after less than two hours, with no progress made on forming a new government. After their exit, Mahdi Hafidh, the acting speaker of the newly elected parliament, adjourned the session until next week, citing the lack of a quorum in the 328-member chamber.

The formation of a government is urgent as Iraq confronts the biggest threat to its existence since it won independence in 1932. Al-Qaeda-inspired insurgents have conquered much of the north and west of the country, Kurds have asserted control over the northern city of Kirkuk, and the government in Baghdad has been scrambling to hold together what is left of its collapsing security forces.

The head of the Islamist insurgency, meanwhile, has urged his radical fighters to step up their attacks in the Muslim holy month of Ramadan, which began Sunday.

Caretaker Prime Minister Nouri al-Maliki, who is attempting to remain in power despite a groundswell of opposition to his quest for a third term, was among those who attended the parliamentary session in central Baghdad.

It is his future that is the most divisive issue facing lawmakers, but parliament must also make selections for two other top posts — the speaker and the president. There was no indication Tuesday that it was closer to a deal.

Deputy Prime Minister Saleh al-Mutlak, a Sunni, said that the candidates would be decided in the next “week or two” but that there was little doubt that Maliki would be replaced. “The matter is over. They know they have to choose a new prime minister.”

While the lawmakers wrangled, the United Nations announced that 2,417 Iraqis were killed in violence in June, not including deaths in the war-torn province of Anbar. It was one of the highest monthly tolls since the U.S.-led invasion in 2003. Of those killed, 1,531 were civilians, a figure that the U.N. special representative for Iraq, Nickolay Mladenov, called “staggering.”

“It is imperative that national leaders work together to foil attempts to destroy the social fabric of Iraqi society,” he said.

Feuding lawmakers

The parliamentary session got off to a positive start with the playing of the national anthem as 255 lawmakers gathered in the chamber — an unexpectedly high turnout for the typically poorly attended parliament.

But tensions quickly surfaced as a Kurdish lawmaker and a Shiite one traded barbs over the central government’s failure to make budget payments to the semiautonomous region of Kurdistan.

“They are Kurds, not Iraqis,” Mohammed Naji Mohammed, the Shiite lawmaker, said after the argument.

Mohammed, who represents the Badr Organization and was dressed in combat fatigues, complained that Kurdish politicians had distracted the chamber with a “side issue,” and he accused Kurds of using the insurgent crisis to make a land grab.

In an interview with the BBC on Tuesday, Massoud Barzani, president of Iraq’s Kurdish region, said the Kurds would hold a referendum on the independence of Kurdistan in a matter of months — perhaps setting in motion a breakup of the Iraqi state. “In reality, Iraq is partitioned. Should we stay in this tragic situation?” he said. “We can’t remain hostage to an unknown future indefinitely.”

While the Kurds have started to reinforce their new borders, encompassing long-disputed territory, insurgents on Sunday announced a new Islamic state, or caliphate, in the areas they control in Iraq and Syria. In a 19-minute audio message Tuesday, the self-styled emir of the caliphate called on all Muslims to pledge allegiance to the new state.

Abu Bakr al-Baghdadi urged his fighters to “terrify the enemies of Allah and seek death in the places where you expect to find it.”

“So to arms, to arms, soldiers of the Islamic state. Fight, fight,” said Baghdadi, leader of the Islamic State of Iraq and Syria, now renamed Islamic State.

He urged Muslims with practical skills, including scholars, judges, doctors, engineers and people with military and administrative expertise, to “answer the dire need of the Muslims” in the new state.

Divisions everywhere

The United States is among those encouraging Iraq to speed up the creation of a more inclusive government, with the hope that if disaffected Sunnis are engaged in the political process, it could chip away support for Islamic State.

But a rift among Sunni lawmakers has emerged over whom they will support for speaker.

In accordance with the power-sharing arrangement that emerged under the U.S.-brokered constitution drawn up in 2005, the jobs of speaker, president and prime minister have traditionally been shared among the Sunni, Kurdish and Shiite blocs, respectively.

Maliki’s political bloc has been calling to replace the current speaker, Osama al-Nujaifi. But Sunnis are not prepared to announce his replacement until they have a guarantee that Maliki will step aside, said Dhafer al-Ani, a spokesman for the Sunni Mutahidun bloc.

“We can’t start a step on our own, without knowing what the final step will be,” he said.

Kurds also have not settled on a candidate for the presidency, though Barham Salih, a former deputy prime minister, is considered the front-runner.

Meanwhile, Shiites, who form the biggest bloc, are deeply divided over whom to pick as prime minister. Although a consensus appears to have emerged that ­Maliki should go, there is no sign of an agreement on his replacement.

Haidar al-Abadi, a member of Maliki’s State of Law coalition, suggested that no agreement is imminent. He also rejected Sunni demands that all three posts be picked at once.

“How can you ask us to select a prime minister when the Kurds haven’t decided on a candidate for president and the Sunnis haven’t agreed on a speaker?” he asked. “The first two phases aren’t complete. Choosing the prime minister is the final link in the chain.”

With Sunni insurgents active on the outskirts of Baghdad, the government imposed a security clampdown across the capital ahead of the parliamentary session. A public holiday was declared to keep the streets clear of traffic, soldiers and police were deployed in force, and bridges across the Tigris River were closed.

In remarks Tuesday at the Carnegie Endowment for International Peace in Washington, Lukman Faily, Iraq’s ambassador to the United States, said the Obama administration should not hold military assistance hostage to formation of a new government in Baghdad.

“These issues will be resolved in due time,” Faily said of the government. But “we need your help now. Don’t condition it. . . . The risk is too immediate.”

Daniela Deane in London and Karen DeYoung in Washington contributed to this report.