An Iraqi joke says that their country must have the most environmental government in the world since the same political leaders are always recycled, however dismal their past performance and low expectations that they will do any better in future.

The biggest change in the next Iraqi government will be that Haider al-Abadi, appointed prime minister after the Isis victories of 2014, is unlikely to be heading it. He has conceded that he will not last in office after protests engulfed Basra in southern Iraq and led to important religious and political leaders withdrawing their support and calling on him to resign.

Mr Abadi’s fate had been in the balance since he did unexpectedly badly in the general election on 12 May when his coalition came in third. Weakened by the result of the poll, he needed to bring on side those who had done better such the nationalist cleric Muqtada al-Sadr, but he ultimately failed to do so.

Although Mr Abadi will not be the next prime minister, most of the top political players will be the same as those blamed by many Iraqis for misruling the country in the 15 years since the overthrow of Saddam Hussein in 2003. A quota system dividing senior posts between Shia, Sunni and Kurds combined with the sharing out of ministries between the parties, favours permanent political stalemate and ensures a complete failure to tackle rampant corruption or to provide essential services such as electricity and water.

Mr Abadi had hoped that the defeat of Isis and the recapture of Mosul after a nine-month siege last year would win voters’ backing. The Iraqi armed forces followed up victory at Mosul by retaking Kirkuk along with territory long disputed with the Kurds in northern Iraq.

Security in Iraq has much improved since the defeat of Isis and over the last six months it has been the best since 2003. But Iraqis did not see Mr Abadi as the sole architect of military success and the low 45 per cent turn out in the election underlined their disillusionment with the entire political elite. Mr Sadr and his Sairoon group got the most seats by campaigning for progressive economic and social policies, followed by the Fatah alliance led by the paramilitary leader Hadi al-Amiri. Mr Amiri has withdrawn from consideration to become prime minister.

Mr Abadi, strongly supported by the US, might have clung on if he had kept the backing of the Sadrists, but they felt that their support had been taken too much for granted in the past. They wanted Mr Abadi to resign from the ruling Dawa party and endorse their reformist programme. Other politicians whom Mr Abadi needed to conciliate accused him of seldom consulting them and operating through a narrow clique of advisers.

Water level drops dramatically in Iraq's Tigris river

Although the main players in Iraqi politics are much the same, the overall political environment has altered radically. Isis had been advancing on Baghdad when Mr Abadi first became prime minister and people feared massacre and displacement. But the defeat of Isis meant less concern for personal security and heightened resentment against the corruption and incompetence of the government, despite oil revenues that in August alone this year were worth $7.7bn. Mr Abadi could claim credit for defeating Isis, but many Iraqis felt that this was almost his only identifiable achievement.

The protests in Basra, at the heart of the area that produces most of the crude oil, were the most widespread and destructive since the fall of Saddam Hussein. They showed grievances boiling over in the majority Shia community. During this summer, which was hot even by Iraqi standards with temperatures rising to 50C, there was an electricity shortage in southern Iraq so air conditioning did not operate and there was too little drinking water.

The breaking point for many in Basra came when there was not only a lack of water to drink but thousands of those who did drink it became ill with diarrhoea and stomach complaints. There were fears of a cholera epidemic. Salt water was mixing with the fresh water because of broken pipes, reducing the effectiveness of the chlorine in killing bacteria. Hospitals said they had treated 17,500 patients, though this was denied by a government official who, showing a lack of sympathy that enraged people in Basra, said that the figures for those in hospital were much exaggerated and “only 1,500 people have been poisoned”.

Peaceful protests grew violent with 27 people killed as government and party offices, with the exception of Sairoon, were set ablaze as well as the Iranian consulate. Mr Abadi went to Basra but could not get a grip on the crisis. This was a final blow to his hopes of remaining prime minister. Mr Sadr withdrew his support and called on him to resign. The vastly influential Grand Ayatollah Ali Sistani issued a statement saying that the next prime minister should be a new one.