TEHRAN — Iranian police and plainclothes security officers mobilised Saturday to quell a third straight day of nationwide antigovernment demonstrations that for the first time reached the capital, where the chants among protesters included “Death to the dictator!”

The bold reference to Supreme Leader Ayatollah Ali Khamenei — the all-powerful leader of a theocracy that for 38 years has stage-managed street demonstrations and stifled public expression — reflected the depth of frustration driving the biggest show of public discontent that Iran has seen in years.

Anti-riot police on motorcycles broke up an unauthorised gathering of about 200 people at Tehran’s Enghelab Square while authorities in the central city of Shahreh Kord fired tear gas as the government tried to keep the apparently spontaneous demonstrations from gaining momentum.

Witnesses said police detained at least 12 demonstrators and stationed water cannons near Enghelab Square (Enghelab means “revolution” in Farsi) after dozens were arrested in other cities a day earlier. Interior Minister Abdul Reza Rahmani Fazli cautioned Iranians against taking part in “illegal gatherings.”

“Police and law enforcement have tried to manage the situation,” Fazli said.

At the same time, thousands of pro-government demonstrators took to the streets to commemorate the suppression of the last major street protests in Iran, in 2009, following the disputed reelection of then-President Mahmoud Ahmadinejad. The annual rallies had been planned earlier, but the choreographed chants of “Death to America!” took on added significance as a counterweight to the unauthorised economic protests.

The anti-government demonstrations that began Thursday in Mashhad, Iran’s second largest city, have now spread to more than 10 cities and appear to be driven by frustration over a stagnant economy, official corruption and soaring prices for eggs and other basic goods.

As the rallies gathered steam, protesters — most in their 20s and 30s — also called for the release of political prisoners and chanted against both the hard-line Khamenei and President Hassan Rouhani, a relative moderate who has failed to deliver on promises of economic and social reform.

Many analysts expected police and the government’s feared Basij volunteer militia to clamp down hard. Ahmad Khatami, a firebrand cleric who is close to the ruling establishment, called Friday for a heavy-handed crackdown against “anarchists who violate the law.”

But the security presence did not deter demonstrators in Enghelab Square, near Tehran University. They chanted, “Death to this deceitful government,” and “We will die, we will die, we will take back Iran.”

Plans for further protests Saturday night and Sunday were ricocheting across Telegram, a widely used messaging app.

“People ask me what will happen next,” Abbas Abdi, a leader of the 1979 seizure of the American Embassy in Tehran who is now an influential advocate of political reforms, wrote in a newspaper column. “And I can say that people can tolerate economic pressure but not humiliation.”

US President Donald Trump in a series of tweets voiced support for the demonstrations Saturday.

“Many reports of peaceful protests by Iranian citizens fed up with regime’s corruption & its squandering of the nation’s wealth to fund terrorism abroad. Iranian govt should respect their people’s rights, including right to express themselves. The world is watching!” Trump said.

Two other tweets followed: “The entire world understands that the good people of Iran want change, and, other than the vast military power of the United States, that Iran’s people are what their leaders fear the most ...” Trump said, before lobbing a third and final tweet on the subject.

“Oppressive regimes cannot endure forever, and the day will come when the Iranian people will face a choice,” Trump tweeted. “The world is watching!”

Iran responded with comments via the state-run IRNA news agency, attributed to ministry spokesman Bahram Ghasemi.

“The noble Iranian nation never pays heed to the opportunist and hypocritical mottos chanted by US officials and their interfering allegations on domestic developments in the Islamic Republic of Iran,” he was quoted as saying.

Analysts said one of the anti-government protests had been organised by Ahmadinejad, a populist who sought to highlight Rouhani’s mishandling of the economy. Another occurred in the western province of Kermanshah, where more than 500 people died in a magnitude 7.3 earthquake last month and victims have accused the government of being slow to deliver relief.

But what began as economic protests quickly revealed broad anger at a ruling establishment that has failed to rein in corruption while funding costly military adventures abroad, including sponsoring Houthi rebels in Yemen and pro-government forces in Syria.

The protesters have not spared Rouhani, who won reelection this year in large part because of his opposition to the hard-line social restrictions backed by Khamenei and his championing of the 2015 nuclear deal that improved relations with the West.

Until now, most of Iran’s pro-reform crowd placed its hopes in Rouhani and the jailed leaders of the Green Movement, which led the mass 2009 protests. The anger against Rouhani and the absence of Green Movement slogans in these demonstrations suggested they were coming from a new and undefined political force.

“As an activist who participated in many post-2009 protests, now I am sceptical about the motives of these protesters and their targets,” Milad Waseli, a writer and pro-reform activist, said inside his shop near Enghelab Square

“I am surprised. In the past, when we were in a much direr economic situation with even more severe inflation, we did not witness protests like these.”

The government sought to discredit the rallies. A news anchor on state-run television aligned the protesters with Trump, one of the Iranian government’s loudest critics.

“The State Department issued a statement urging countries “to publicly support the Iranian people and their demands for basic rights and an end to corruption.”

Hesameddin Ashna, media manager of Iran’s presidential office, tweeted that he sympathised with the protesters’ economic demands but warned that the demonstrations could end in violence.

Iran’s telecommunications minister, Mohammad Javad Azari Jahromi, appealed to Telegram Chief Executive Pavel Durov, tweeting that one of the social network’s channels was “encouraging hateful conduct, use of Molotov cocktails, armed uprising and social unrest.” Many Iranians saw the comments as a pretext for the government to block the app, one of the main ways that protesters have organised.

A former lawmaker, Ahmad Tavakoli, told the reformist news outlet Jamaran: “The starters of the protests, in these cases, are the people, but the ones who end them are not the people.”