ANGRY Iranians are still in the streets, but the widespread protests that have been rocking Iran appear to be fizzling out. Starting on December 28th, Iranians came out to complain about high prices, low wages and a lack of jobs. The interior minister put the crowds at 42,000, spread across dozens of cities and towns. Even if that is an underestimate, it falls far short of the scale of protests nine years ago, when hundreds of thousands demonstrated against a fishy election. Still, the unrest has spooked the regime, in part because demonstrators called for a complete change of government. The response was forceful. More than 20 people were killed. A reformist MP says that 3,700 were arrested.

The regime and countries in the West are now pondering their next steps. On January 9th Ayatollah Ali Khamenei, Iran’s supreme leader (pictured), blamed America and Britain for the protests; his officials claim to have evidence that they were directed from abroad. “This won’t be left without a response,” he said on Twitter. But so far the government has only banned the teaching of English in primary schools, warning of a “cultural invasion”.

The regime has acknowledged home-grown problems, too. Mr Khamenei says the protesters’ grievances “must be dealt with and heard”. Hassan Rouhani, the president, has gone further, arguing that the unrest was due to cultural and social restrictions imposed by clerics. He blamed “the gap between officials and young people”. But he may struggle to close it: his presidency has been riven with infighting, and the hardliners who wield real power distrust him. The government may instead focus on areas where there is agreement, such as shutting down illicit credit institutions, many of which have gone bust, wiping out ordinary Iranians’ deposits.

Donald Trump hailed the protesters for “finally acting against the brutal and corrupt Iranian regime”. But some in America and Europe fear that embracing the dissidents will undermine them. Similar thinking led Barack Obama to keep mum in 2009. Even then, the regime accused protesters of being foreign agents. This time European governments kept quiet for nearly a week after the first signs of unrest. When Federica Mogherini, the European Union’s foreign-policy chief, finally broke her silence, it was only to call for restraint. Emmanuel Macron, France’s president, criticised America and its Middle Eastern allies for loudly supporting the protesters.

The EU has a larger concern: the fate of the nuclear deal between Iran and six world powers. After years of painstaking diplomacy, the agreement, signed in 2015, imposed limits on Iran’s nuclear programme in exchange for relief from sanctions. Iran is largely keeping up its end of the bargain, says the International Atomic Energy Agency (IAEA), which inspects its nuclear facilities. In October Mr Trump nonetheless refused to certify its compliance, as he must do every three months. As The Economist went to press, he faced another deadline.

Last time Mr Trump stopped short of reinstating American sanctions, which could prompt Iran to withdraw from the deal. By mid-January he must again decide whether to do so. European diplomats worry that the protests will give him a pretext. The head of Iran’s nuclear agency said he might then stop co-operating with the IAEA. But Iran has an interest in preserving the deal and keeping the other signatories on board. Unlike America, the EU has completely lifted economic sanctions. If Iran kicks out nuclear inspectors, those too could be reimposed.

European countries could assuage Mr Trump by working to counter Iran’s meddling in Syria, Iraq and elsewhere. Congress wants to use targeted sanctions to punish Iranian officials who preside over human-rights abuses. America could also hone existing sanctions, which have unintended consequences. Many protesters communicated over Telegram, a popular messaging app, before the regime blocked it. Activists in other countries might have switched to Signal, a similar app. It is harder to shut down because it uses Google’s cloud-computing platform to disguise its traffic. That platform, however, is largely blocked in Iran—by Google itself, which fears falling foul of American sanctions.

Such a change could help during the next round of protests, which is all but inevitable. Iranians had high expectations for Mr Rouhani. They remain unmet. Though GDP is growing, unemployment is stubbornly high. Corruption is widespread. Water shortages, poor air quality and the bungled response to a deadly earthquake last November have damaged the regime’s reputation. In contrast with the protests of 2009, which were led by an urban elite, the recent unrest occurred in towns and small cities that cheered the Islamic revolution in 1979. A generation later, its promises ring hollow to an ever larger portion of Iranians.