Iran's supreme leader has pardoned "tens of thousands" of prisoners including some arrested in recent anti-government protests, state news agency IRNA reported on Sunday, after a deadly state crackdown helped quell the nationwide unrest.
However, the pardon approved by Ayatollah Ali Khamenei came with conditions, according to details announced in state media reports, which said the measure would not apply to any of the numerous dual nationals held in Iran.
State news agency IRNA said those accused of "corruption on earth" - a capital charge brought against some protesters, four of whom have been executed - would also not be pardoned.
Neither would it apply to those charged with "spying for foreign agencies" or those "affiliated with groups hostile to the Islamic Republic", state media reported.
Iran was swept by protests following the death of a young Iranian Kurdish woman in the custody of the country's morality police last September. Iranians from all walks of life took part, marking one of the boldest challenges to the Islamic Republic since the 1979 revolution.
According to the HRANA activist news agency, about 20,000 people have been arrested in connection with the protests, which the authorities accused Iran's foreign enemies of fomenting.
Rights groups say over 500 have been killed in the crackdown, including 70 minors. At least four people have been hanged, according to the Iranian judiciary.
In a letter to Khamenei requesting the pardon, judiciary head Gholamhossein Mohseni Ejei said: "During recent events, a number of people, especially young people, committed wrong actions and crimes as a result of the indoctrination and propaganda of the enemy.
Protests have slowed considerably since the hangings began.
"Since the foreign enemies and anti-revolutionary currents' plans have been foiled, many of these youth now regret their actions," Ejei wrote.
Khamenei approved the pardons in honour of the anniversary of the 1979 Islamic revolution.
It would not apply to those "facing charges of spying for foreign agencies, having direct contact with foreign agents, committing intentional murder and injury, (and) committing destruction and arson of state property".
"Naturally, those who do not express regret for their activities and give a written commitment for not repeating those activities, will not be pardoned," deputy judiciary chief Sadeq Rahimi said, state media reported.
The Norway-based Iran Human Rights group said this week that at least 100 detained protesters faced possible death sentences.
Amnesty International has criticised Iranian authorities for what it called "sham trials designed to intimidate those participating in the popular uprising that has rocked Iran".
(Reporting by Dubai Newsroom and Parisa Hafezi; Writing by Tom Perry; Editing by Toby Chopra and Raissa Kasolowsky)