The detention of citizens of Germany, Poland, Italy, France, the Netherlands, Sweden and other countries is likely to ratchet up tensions between Iran and Western countries over the death of Mahsa Amini.
The escalation comes as more casualties were reported. Nineteen people were killed after security forces fired on armed protesters attacking a police station, said an official.
Tehran has responded to international condemnation of the case by lashing out at its critics, accusing the United States of exploiting the unrest to try to destabilise Iran.
The nine unidentified people were detained "during the riots or while plotting in the background," the Intelligence Ministry said in a statement carried by Iranian media.
Amini, a 22-year-old from the Iranian Kurdish town of Saqez, was arrested this month in Tehran for "unsuitable attire" by the morality police who enforce the Islamic Republic's strict dress code for women.
Her death has caused the first big show of opposition on Iran's streets since authorities crushed protests against a rise in gasoline prices in 2019. The demonstrations have quickly evolved into a popular revolt against the clerical establishment.
Demonstrations have spread from Amini's hometown to all of Iran's 31 provinces, with all layers of society, including ethnic and religious minorities, joining in.
Fearing an ethnic uprising and in a show of power, Iran fired missiles and drones at targets in neighbouring northern Iraq's Kurdish region this week after accusing Iranian Kurdish dissidents of being involved in the unrest.
Western human rights groups say that Iran, dominated by its Persian Shi'ite majority, discriminates against ethnic and religious minorities. Tehran denies this.
While analysts don't expect Iran's clerical rulers to fall, they are on the defensive and are struggling to come up with a strategy to defuse the fury.
Rights groups said dozens of activists, students and artists have been detained and the Committee to Protect Journalists said on Twitter that it had learned that security forces had arrested at least 28 journalists as of Sept. 29.
A senior Iranian cleric called for tough action against protesters.
"Our security is our distinctive privilege. The Iranian people demand the harshest punishment for these barbaric rioters," said Mohammad Javad Haj Ali Akbari, a leader of prayers that are held on Fridays in Tehran before a large gathering.
Amnesty International said on Friday the government crackdown on demonstrations has so far led to the death of at least 52 people, with hundreds injured.
Despite the growing death toll, videos posted on social media showed demonstrators calling for the fall of the clerical establishment.
Heavy shooting could be heard on some videos as protesters chanted "Death to Khamenei", referring to Supreme Leader Ayatollah Ali Khamenei.
Human rights group Hengaw posted a video that it said showed protests late on Friday in Saqez, home town of Amini. Young women were seen cheering as they took off and waved their headscarves in protest against Iran's hijab rules.
Activist Twitter account 1500tasvir, which has more than 150,000 followers, posted videos of protests in the southwestern oil city of Abadan, with demonstrators chanting "Clerics must get lost". Other videos purported to show protests in Karaj, west of Tehran, and Isfahan in central Iran.
Reuters could not verify the footage.
State television said "unidentified armed individuals" opened fire on a police station in the southeastern city of Zahedan, prompting security forces to return fire. Nineteen people were killed, including security forces, the provincial governor told state television. Twenty people were injured.
State media reported that the elite Revolutionary Guards' intelligence chief in Sistan and Baluchistan province was killed in Zahedan during clashes with "terrorists".
A video on social media showed aid being given to several injured protesters by their comrades, one of whom was trying to limit bleeding from a man who appeared to be shot in the neck.
Amid reports of a planned student strike, authorities said Zahedan university will hold distance learning until Oct. 8, the semi-official news agency ISNA reported.
Internet watchdog NetBlocks said on Twitter that Live network data show a regional internet disruption in effect in Zahedan.
Southeastern Iran, home to the Baluch ethnic minority, has also seen demonstrators torching government offices in at least one city. State news agency IRNA said an attempt to assassinate a judge in the town of Saravan had failed.