At the very moment that Iraq needed to be as strong as possible, to cope with the destabilising impact of the US-Iran confrontation, an indecisive election two months ago weakened the government.

Prime minister Haider al-Abadi was expected to do better in the parliamentary election on 12 May because of the credit he gained when the Iraqi army recaptured Mosul, the de facto capital of Isis, in July last year.

A few months later, Mr Abadi had a further success when Iraqi security forces responded to an ill-advised Kurdish referendum on independence by reoccupying the oil province of Kirkuk. Iraq appeared to be at last emerging from 40 years of crisis and war.

But improved security – there is less violence in Iraq than at any time since the US invasion of 2003 – has had the paradoxical consequence of allowing Iraqis to focus less on the day-to-day business of staying alive and more on the chronic failings of their corrupt and dysfunctional government.

They ask what happened to the hundreds of billions of oil revenue dollars that have been spent, yet they still lack water, electricity, job and houses.

Mr Abadi’s political grouping came in third in the election with 42 seats in the 329 seat parliament, while the surprise winner was the Sairoun Alliance of the populist nationalist cleric Muqtada al-Sadr with 54 seats.

He was closely followed by the movement led by Hadi al-Ameri drawn from the Shia paramilitary Hashd al-Shaabi which won 47 seats. Nobody came close to winning a majority.

Mr Abadi is still in office, but political experts in Baghdad estimate his chances of staying on as prime minister at only about 30 per cent, though they add that he has no obvious successor.

He is happy to stay where he is while political parties haggle over who gets what top job and control of ministries, though even this process is being delayed as votes are recounted in much of the country, following widespread allegations of ballot rigging.

Unsurprisingly, public confidence that a new government will ultimately be created that is much better or different from the old one is fading away.

Disillusionment with the predatory political class that has ruled Iraq for the last 15 years was already high, with only 44.5 per cent of voters going to the polls in the election.

Iraqis easily get nervous about the political situation, which is scarcely surprising given the extreme violence with which they have lived for so long.

Iraqis walk on a damaged street in west Mosul a few days after the government’s announcement of the liberation of the embattled city from Islamic State (IS) group fighters (Getty)

They worry, among many other things, that the defeat of Isis may not be as permanent as the government claims.

When Isis kidnapped and murdered eight security men on the Baghdad-Kirkuk road last month, there was an angry popular reaction. The government tried to calm the situation by immediately executing 13 Isis prisoners on death row, but fear is only just below the surface.

The legacy of terror left by Isis is not the only destabilising factor.

What is happening to Iraqi sovereignty in all this? Iraqi politician

The US and Iran have been rivals – and occasional collaborators – in Iraq for decades, but the conflict between the two is heating up and this exacerbates existing divisions within Iraq.

“What is happening to Iraqi sovereignty in all this?” asked one Iraqi politician, going on to list units of the Iraqi security forces subject to foreign influence.

The Hashd are deemed to be pro-Iranian and US-trained military forces are seen as pro-American, though real allegiances are more nuanced than these crude labels suggest.

In the wake of the US withdrawal from the Iran nuclear deal in May, the Trump administration is trying to force Iran into a political submission by rigorously enforced sanctions that amount to an economic siege.

Iraq, which has a 900 mile border with Iran, is sometimes described as “the lungs” of Iran and is an obvious escape hatch for Iranian imports and exports, but one which the US is trying hard to close.

It is denouncing Iraqi political figures seen as close to Iran as “terrorists” and targets banks doing business with Iran. This is bad news for Iraq because the US and Iran have many pressure points and proxies within the country and they will not be restrained in using them.

Iraq needs a strong leader and a strong government to cope with these multiple pressures, but it does not look as if it is going to get either.

“In all parliamentary systems the government is weak,” said Hadi al-Amiri, the leader of Fatah, which will be the second biggest political alliance in the new parliament when it finally meets, in an interview with The Independent.

Populist nationalist cleric Muqtada al-Sadr was a surprise winner in the polls (Getty)

This is a dubious proposition applied to the world in general, but it is certainly true in Iraq at present because power is fragmented and any future coalition government will contain political parties able and willing to checkmate each other.

Mr Amiri describes the Iraqi system as being akin to that of Lebanon, with the top posts distributed using a quota system loosely based on success at the polls and religious affiliation.

But the parallel is not exact or to Iraq’s advantage, with one Iraqi observer caustically agreeing that there are “similarities between the political systems, but in Lebanon they do not always appoint incompetent idiots to senior positions as we frequently do in Iraq.”

Institutionalised incompetence and corruption prevails for a reason: Iraq has a patronage or “spoils” system like Tammany Hall in New York a hundred years ago when money, jobs and contracts were the reward for party support and loyalty.

Ministries in Iraq become the private fiefdoms of the politicians and parties that control and exploit them. This system has now been going on so long that government payrolls are stuffed with patronage appointees notoriously incapable of doing their job, even if they wanted to, whether it is building a bridge or awarding a contract.

Reforming such a system, in which so many people have a vested interest, would be difficult for a strong government and this is exactly what Iraq is unlikely to get. Moreover, Iraq has many power centres that compete with – and sometimes colonise – central government.

Iraqis have a saying that there are four authorities in the country: the government itself, the Shia religious hierarchy or Marja’iyyah, the tribes and the Hashd al-Shaabi or Shia paramilitary forces.

“If you have a traffic accident it doesn’t matter whether you are right or wrong, but what tribe you belong to,” complained one woman in Baghdad. On the main roads, checkpoints are operated by different militias and units of the security forces as their own profit-making custom posts.

The children of Mosul: Iraqi youngsters left psychologically damaged by ISIS war

The right leader backed by a strong party might be able to change the Iraqi state for the better. The task should be easier because Isis is defeated and fear of suicide bombings and assassinations is no longer the main preoccupation.

But reforming a system, however dysfunctional, that gelled long ago would not be easy in any country and certainly not in Iraq. Soon after US troops had occupied Baghdad in 2003, an Iraqi neurosurgeon, observing the chaos, said to me that one should always remember that even a dictator as ferocious as Saddam Hussein “found it difficult to rule Iraq”.

Read the first piece in Patrick Cockburn’s latest series, ‘Catastrophic drought threatens Iraq as major dams in surrounding countries cut off water to its great rivers’, here.

Part II, ‘For this Iraqi tribe massacred by Isis, fear of the group’s return is a constant reality’, here