A ruthless and competent Iran, with its vast arsenal of missiles, unforgiving ideology and network of murderous proxies across the Middle East, is a danger to its neighbours and the wider world. But as the West and the thousands of people who have taken to the streets in recent days to protest against the regime may be about to discover, a ruthless but malfunctioning Iran could be more dangerous still.

The Islamic Republic was clearly taken aback by the US killing of the previously untouchable General Qassim Soleimani. Its light-touch retaliation defied the blood-curdling rhetoric of revenge. But then came the catastrophic shooting down of a civilian airliner and the three days of lies and denial that followed.

At protest outside the British embassy in Tehran, demonstrators burnt British and Israeli flags. Credit:AP

Everything the Iranian authorities did that night was criminally irresponsible. Why were passenger planes allowed to fly in and out of Tehran in the hours of maximum tension with the Americans? Why were anti-aircraft units not alerted to those flights? Even after Iranian responsibility was admitted, different camps have been warring over who should take the blame.

Those of us who have watched Iran over the past few decades know that coherent command-and-control structures and effective government have never been the regime's forte. This time, however, the infighting, dysfunction and paranoia have reached a deadly new crescendo. And all at a moment of intense pressure.