The Iranian Revolutionary Guard declared the "end of sedition" on Wednesday evening as tens of thousands gathered across Iran in a massive show of strength for the government after days of deadly unrest, with state television showing vast crowds marching through several cities.

IRGC general Mohammed Ali Jafari said that the revolutionary guards had intervened in a "very limited" way against fewer than 15,000 "trouble-makers" nationwide, adding that a large number had been arrested.

"Today we can announce the end of the sedition," Jafari was quoted on the Guards' website as saying.

"A large number of the trouble-makers at the centre of the sedition, who received training from counter-revolutionaries... have been arrested and there will be firm action against them," he said.

Jafari spoke after thousands of pro-regime demonstrators took to the streets in support of the government.

Chants of "Leader, we are ready" were heard as images showed thousands rallying in the cities of Ahvaz, Kermanshah, Gorgan and elsewhere.

The demonstrators waved Iranian flags and pictures of Supreme Leader Ayatollah Ali Khamenei, as well as placards saying "Death to seditionists."

"We offer the blood in our veins to our leader," was another popular chant.

There were few reports of anti-regime protests overnight after the political establishment closed ranks against the unrest that since last week has left at least 21 dead.

Iranian President Hassan Rouhani told Turkish President Recep Tayyip Erdogan in a phone call that he hoped the protests in Iran would end in a few days, sources in Erdogan's office said on Wednesday.

In the phone call, Erdogan said Rouhani had taken an appropriate stance by saying demonstrators should not violate the law while exercising their right to peaceful protests, the sources said.

Washington continued to exert pressure on the Islamic republic, with its UN ambassador Nikki Haley calling for emergency UN talks to discuss the situation.

"The people of Iran are crying out for freedom," she said at a news conference. "All freedom-loving people must stand with their cause."

Iran's leaders have said the protests, which began over economic issues on 28 December but quickly turned more radical, were part of a foreign plot to destabilise the regime.

"The enemies have united and are using all their means, money, weapons, policies and security services to create problems for the Islamic regime," Khamenei said.

"The enemy is always looking for an opportunity and any crevice to infiltrate and strike the Iranian nation."

'The poor under pressure'

Even reformists, who backed the last major protest movement against alleged election-rigging in 2009, condemned the violence and the support it has received from the United States.

But they also urged the authorities to address economic grievances that have fuelled the protests.

"Officials must acknowledge the deplorable situation of the country as the first step to hearing the protesters," tweeted Mohammad Taghi Karroubi, whose father Mehdi Karroubi has been under house arrest for almost seven years for helping lead the 2009 demonstrations.

Many have been turned off by the violence, which has contrasted with the largely peaceful marches in 2009.

'People have reached a stage where they can no longer tolerate this pressure from the authorities. They have burst and are now out in the streets'

- Soraya Saadaat, unemployed woman

But on the streets of the capital, there is widespread sympathy with the economic grievances driving the unrest, particularly an unemployment rate as high as 40 percent for young people.

"The poorer section of society is really under pressure," Sakineh Eidi, a 37-year-old pharmacist in Tehran, told AFP. "But I don't think it will continue."

"Even those who maybe acted emotionally, vandalising things and setting fire to public property, know that the smoke will get into everyone's eyes and that insecurity in the country is not in anyone's interest."

Others rejected the official line that foreign powers were behind the unrest.

"I don't agree. People have reached a stage where they can no longer tolerate this pressure from the authorities. They have burst and are now out in the streets," said Soraya Saadaat, a 54-year-old unemployed woman.

12 percent unemployment

There were only limited reports of violence and clashes in provincial areas on the night of Tuesday to Wednesday.

Two men fired on a bank and police post in the central province of Isfahan, without causing casualties, said state television.

"No information has been published on clashes or arrests in Tehran," said reformist news agency ILNA late Friday.

Police presence in the capital also appeared to have dwindled, official media and AFP journalists said.

That was in contrast with the previous two nights, when multiple deaths were reported across smaller towns, including six protesters killed during attacks on a police station in Isfahan province.

As violence grew, authorities stepped up arrests, with at least 450 people detained in Tehran between Saturday and Monday, and many more in outlying areas.

The authorities must now investigate the deaths, and remove arbitrary restrictions on internet access, Human Rights Watch said on Wednesday.

“The rising death toll bodes ill for Iranians who are daring to take their grievances to the streets,” said Sarah Leah Whitson, Middle East director at HRW.

“Rather than issue barely veiled threats against protesters, the authorities should investigate these deaths, ensure the rights of all detainees, and guarantee that people can protest freely and peacefully.”

Rouhani came to power in 2013 promising to mend the economy and ease social tensions, but high living costs and a 12 percent unemployment rate have left many feeling that progress is too slow.

Rural areas, hit by years of drought and under-investment, are particularly hard-hit.

Rouhani on Sunday acknowledged there was "no problem bigger than unemployment", and also promised a more balanced media and more transparency.

In 2009, authorities ruthlessly put down protests against the re-election of hardliner Mahmoud Ahmadinejad. At least 36 people were killed, according to an official toll, while the opposition says 72 died.

Meanwhile, Reza Pahlavi, the last heir to the Iranian monarchy, said the Trump administration should encourage US technology companies to provide communication services to Iranians as they protest their country's clerical rulers.

In an interview with Reuters on Wednesday, Pahlavi also criticised the Trump administration's ban on travel to the United States by most Iranians, calling it "ridiculous".

Pahlavi has lived in exile for nearly four decades, since his father, the US-backed shah, was overthrown in the 1979 Islamic Revolution.

Some demonstrators have in recent days chanted slogans in favor of Pahlavi's grandfather, Reza Shah, breaking a longstanding taboo.

Pahlavi said he wants to see Iranians "determine their own fate out of their own free will," and praised US President Donald Trump and members of his cabinet for speaking in support of Iranian protesters.