Iran's Revolutionary Guards said Wednesday that the unrest that had rocked Iran over several days was at an end, and that a maximum of 15,000 people had taken part nationwide.
"Today we can announce the end of the sedition," said Mohammad Ali Jafari, commander of the Revolutionary Guards.
"There were a maximum of 1,500 people in each place and the number of trouble-makers did not exceed 15,000 people nationwide," he said on the Guards' website.
"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."
Jafari said the Guards, a parallel security force directly loyal to supreme leader Ayatollah Ali Khamenei, only intervened "in a limited way" in the provinces of Isfahan, Lorestan and Hamedan.
Protests over economic problems broke out in second city Mashhad on December 28 and quickly spread across the country, turning against the regime as a whole.
A total of 21 people have died in the unrest, with protesters attacking government buildings and police stations in some areas.
"The counter-revolutionaries intervened massively on social media," Jafari said.
He said thousands were based abroad and trained by the United States, while internal "monarchists" and supporters of the exiled People's Mujahideen opposition group were also involved.
"The lack of action" by Iranian officials to shut down online supporters of the unrest had "reinforced the troubles", he said.
"But once restrictions were started, the troubles reduced."