Garvan Walshe is a former National and International Security Policy Adviser to the British Conservative Party. He runs Brexit Analytics.

Imagine a set of street protests against the Government springing up, not in the usual left-leaning centres of London and Manchester, but in Dudley and Swaffham, Peterborough and St Ives, Boston and Leamington Spa. Consider the people participating in them had been those the Government considered their core supporters. Now imagine this happening not in a democracy but in a repressive state that expends huge resources keeping tabs on its population and which has been caught totally off guard by a rising from the same social strata that provide the backbone of its police and security services.

Iran’s regime was caught completely off guard. And it’s running out of time.

When the Shah was toppled in 1979, it was far from clear the new rulers would be clerics. They emerged on top from a struggle with constitutional democrats and communists, and consolidated their grip thanks to Ayatollah Khomeini’s charisma, and Saddam Hussein’s attack on Iran in August 1980. The eight years of war strengthened Khomeini and pro-theocracy institutions like the Revolutionary Guards but did not eliminate Iran’s republican institutions.

Since Khomeini’s death in 1989, Iranian domestic politics has been dominated by an unequal struggle between the democratic and religious parts of the government.

Despite tilting the field heavily in its favour (insufficiently reliable candidates are disqualified in large numbers; the election in 2009 was rigged, and a peaceful uprising against the faked result violently suppressed with the murder and torture of political opponents) it is not a battle the religious leadership has been able to win decisively.

Added to these dictatorial measures, the “principlists” – as the religious faction supportive of Ali Khamenei, the current Supreme Leader, is known – have fought a Breitbart-style culture war against “reformists” that achieved its greatest success with the victory in 2005 of the internationally embarrassing populist Mahmoud Ahmadinejad over the establishment figure mired in corruption Akbar Hashemi Rafsanjani (Rafsanjani died recently in murky circumstances. A new investigation into his death has just been opened).

The culture war exploited long-standing divisions between the urban intellectual and business elite, and ordinary, for want of a better term, “hard-working families”. This proved effective in rallying support for Ahmadinejad in 2005, and was still strong enough to blunt the appeal of the 2009 “Green Revolution”. Allegations of ballot-rigging, evidence of deaths in custody, and sheer police brutality were not enough to counter a still widespread belief that the regime, if not any more on the side of ordinary people, did not, unlike the upper-middle classes, hold them in contempt.

With Iran’s republican institutions firmly in the hands of Ahmadinejad, the regime was able to devote resources to its regional meddling and nuclear ambitions unhindered by a presidency more interested in economic growth and attracting foreign investment. Crucially, this left Tehran free to back Bashar al-Assad’s regime in the early stages of Syria’s civil war. Iranian troops, money, and military advice from the Revolutionary Guards (several of whose senior generals have been killed) poured into Syria.

Military intervention, however, does not come cheap. To help meet the funding gap, Ahmadinejad’s successor as president, the reformist Hassan Rouhani, persuaded the Supreme Leader to accept the nuclear agreement with the UN Security Council because of its economic advantages. But, perhaps because of President Trump’s harder line on Iran, these haven’t been as large as expected.

In the most recent budget, subsidies, including vitally important fuel subsidies, were cut, and spending on public services were kept on a tight leash. The protests emerged from the blame game. While the hardliners tried to blame Rouhani (it’s even suggested the protests were their initiative, but spun out of control) it appears that he leaked documents blaming the spending squeeze on vast funds allocated to foreign adventures and religious foundations. Hence the protest chant:

“No to Gaza, no to Syria. I die for Iran”

Though, to the extent that reliable opinion polling is possible, Iranians are not unsympathetic to the regime’s foreign policy ambitions, they’re much less keen on paying for them.

The culture war strategy, which served to insulate the regime’s foreign policy from economic criticism, is coming unstuck. Whereas they’d once posed as the people’s protectors, and justified their repression to that end, they’ve now been exposed as their robbers, their security forces beating the very people on whose side they were supposed to be on.

The reformists themselves were taken aback by the protests, which weren’t organised by the “right” people. People close to reformist circles that I’ve spoken to tended to dismiss them as insignificant. Rouhani himself, however, appears to understand that this is a mistake. They give him the opportunity to escape attacks for the spending squeeze and position himself as a defender of the people’s rights. There’s nothing like the regime’s suppression of protests to create a new constituency in favour of civil liberty.

This matters because the Supreme Leader is 78 and seriously ill. The “Assembly of Experts” (charged with electing his replacement, and the body that perhaps accounts for Michael Gove’s dislike of Iran) has a reformist majority, and is considering replacing the single leader with a council, or even leaving the post vacant.

The protests are proof that the regime’s rule by cultural division can no longer be sustained. The demand for change is unmistakable. The opportunity for change will soon be at hand. Will the regime choose a transition to democracy, or cling to power as a naked dictatorship?