Supporters of Iran's government have taken to the streets for a third day to rally against the unrest that has gripped the country since late December.

The protests in support of the government, which began after Friday prayers, followed the most significant anti-government outpouring since the 2009 protests against alleged election irregularities.

Almost a week of sometimes violent protests, beginning in late December, left at least 22 people dead, with Iranian authorities accusing the United States, Israel and Saudi Arabia of involvement.

Those protests started in the city of Mashhad on December 28 before spreading to other cities.

Grievances seemed to revolve around Iran's economic situation and its spending on groups in Syria, Lebanon and Gaza.

On Tuesday, in his first public remarks since the rallies erupted, Iranian Supreme Leader Ayatollah Ali Khamenei blamed external "enemies" for the turmoil.

Khamenei said that powers against Iran had allied and used various means, including "money, weapons, politics, and intelligence services", to stir unrest.

'Show of faith'

Al Jazeera's Zein Basravi, reporting from Tehran, said the images of large-scale gatherings in support of the government were intended to show - both to Tehran's rivals abroad and opponents inside the country - that there was significant support for the Iranian establishment.

"People are pouring out onto the streets in a show of faith in the Iranian leadership and the current establishment," he said.

On Wednesday, General Mohammad Ali Jafari, the head of Iran's Islamic Revolutionary Guards Corps (IRGC), declared the unrest was over.

"Today we can announce the end of the sedition," Jafari said in a quote on the IRGC's website. "A large number of the troublemakers at the centre of the sedition, who received training from counter-revolutionaries ... have been arrested and there will be firm action against them."

More than 40 student activists were arrested by the intelligence ministry between Saturday and Thursday, according to an Iranian human rights watchdog.