Iraq’s parliament will today begin the process of electing a new leader after the prime minister, Adel Abdul-Mahdi, resigned last week. His successor will have to cope with the severe unrest that is spreading across the country and which has pitched security forces against demonstrators for nearly two months. Fears are mounting that the country could unravel altogether.

Security forces killed at least 45 civilians who were protesting around the southern city of Nasiriyah on Thursday in one of the worst incidents in the recent outbreak of anti-government protests. The government’s actions were intended to be a show of brute force following the firebombing of the Iranian consulate in Najaf on Wednesday, an attack that was the strongest expression yet of the anti-Iranian sentiment by the Iraqi demonstrators.

But the crackdown has only fuelled growing resentment across central and southern Iraq and the standoff between defiant street protesters and an embattled political class has become more entrenched.

At stake now is whether the post-Saddam Iraq constructed by the US remains viable 16 years after the invasion that overturned the country’s regime and reset the balance of power in the region.

“When the Americans left in 2011, we thought that at least some structures had been left behind,” said Bassma Qadhimi, a doctor in Baghdad. “Then they started stealing more than ever before and everyone looked away. There were a few elections where it wasn’t important if you were a Shia, a Sunni or a Christian. It looked good. Then it unravelled, because every sect stole. But if there’s anything to come from the protests so far, it’s that not sect, but nationality, is leading it.”

Facebook Twitter Pinterest Protesters in Nasiriyah shortly after the Iraqi prime minister’s resignation. Photograph: Murtaja Lateef/EPA

Ever since 2003, Iraq’s governance had been apportioned along sectarian lines and its institutions used as fiefdoms by ministers whose allegiance to political groupings has often transcended fealty to the state.

One result has been endemic corruption and nepotism throughout the country’s public sector, which has plundered the country’s oil wealth and left many Iraqis without opportunities. Looting of state revenues has been the main driver of the protest movement that has been led by a disenfranchised youth but joined by other sectors of society, and has on some days seen up to 200,000 people demonstrating peacefully in Baghdad and other cities.

Toby Dodge, professor of international relations at the London School of Economics and a longtime researcher on Iraq, said the post-2003 system which embedded corruption in the Iraqi state, as well as sectarianism and coercion, was starting to break down – and violence was spiralling as a result.

“A rough-and-ready order was imposed on this political field through an elite pact,” he wrote on Lancaster University’s Sepad website. “The formerly exiled politicians who had done so much to campaign for Saddam Hussein’s removal were placed in power by the US.”

Speaking separately to the Observer, he added: “The ideological underpinnings of the system – the division of Iraqi society into sectarian communities – declined. At the same time the division of spoils between the ruling elites carried on and became increasingly public and apparent, which further delegitimised the system.

“They stopped seeing them as their champions and began to see them as carpetbaggers. Then the ruling elites had to increasingly depend on militia violence to suppress the mobilisation against them and to stay in power. We have seen that today reach its pinnacle.”

Tribal leaders in southern Iraq, where the latest bloodshed was centred, have turned on security forces in the wake of the killings, which they say were directed by Iranian officials who have played a central role in the crackdown.

Iran – which also has a majority Shia population – has played a prominent role in the affairs of Iraq throughout the post-invasion years, and especially since the US withdrew its forces in 2011. The Iranian general Qassem Suleimani has been a central figure in the crackdown, directing a lethal response that started roughly a month ago.

At the same time Iran is facing pressure on the home front and an uprising in Lebanon, where the most important arm of its foreign projection, Hezbollah, plays a vital role in the fragile country’s affairs.

“In Lebanon and in Iraq, they are on a war footing,” said a regional official familiar with Iranian thinking. “They might be able to calm things in Lebanon, but in Iraq they have the tribes to deal with, and that’s where they’re coming unstuck.

“What has been unleashed in the south in particular is a blood feud, and they are blaming Iran and its proxies for this. It’s very dangerous, and unchartered territory for Tehran.”

Tribal leaders in Dhi Qar province have demanded that security forces and militia leaders responsible for the killings in Nasiriyah be held accountable. The stance adds a new layer of complexity to a standoff, which now looms as the most serious Iran has faced in the post-Saddam Middle East. “They are convinced the Americans are behind this,” said the official. “I have never seen them as rattled as they are now.”

Candidates to replace Abdul Mahdi include Hadi al-Ameri, the leader of the Popular Mobilisation Units, which were formed after Islamic State over-ran northern Iraq, and have since become one of Iraq’s most powerful institutions. However, al-Ameri’s role as the organisation’s leader will draw powerful detractors, Iran potentially among them.

The Iraqi parliament has 15 days to nominate a new prime minister, but in the past new leaders have only been named after months of horse trading. Failure to reach a cross-factional consensus could plunge Iraq into an abyss.

“If they do that, they are finished,” said Mahmoud al-Qaisy, a steel worker from east Baghdad. “And so are we. I swear that these thieves have had their day. We cannot go home, and they cannot go on. This is a revolution.”