Iran faced international criticism over the death of a woman held by its morality police, which ignited three days of protests, including clashes with security forces in the capital and other unrest that claimed at least three lives.
The United Nations' (UN) human rights office called for an investigation. The United States, which is trying to revive the 2015 nuclear deal with Iran, called on the Islamic Republic to end its "systemic persecution" of women. Italy also condemned her death.
Iranian officials dismissed the criticism as politically motivated and accused unnamed foreign countries of fomenting the unrest.
Separately, an Iranian official said three people had been killed by un-named armed groups in the Kurdish region of the country where the protests began, the first official confirmation of deaths linked to the unrest.
The semi-official Fars news agency reported that around 300 protesters had gathered in downtown Tehran, chanting "Death to the dictator." AP reporters later saw a heavy deployment of police in the area, as well as torched trash bins and rocks strewn across some intersections.
The governor of Tehran province, Mohsen Mansouri, accused foreign embassies of fanning the protests and said three foreign nationals had been arrested. He did not specify the nationality of the embassies or the detainees.
The UN body said Iran's morality police have expanded their patrols in recent months, targeting women for not properly wearing the Islamic headscarf, known as the hijab. It said verified videos show women being slapped in the face, struck with batons and thrown into police vans for wearing the hijab too loosely.
A similar patrol detained 22-year-old Mahsa Amini, taking her to a police station where she collapsed. She died three days later. Iranian police have denied mistreating Amini and say she died of a heart attack. Authorities say they are investigating the incident.
"Mahsa Amini's tragic death and allegations of torture and ill-treatment must be promptly, impartially and effectively investigated by an independent competent authority," said Nada Al-Nashif, the acting UN high commissioner for human rights.
US Secretary of State Antony Blinken said Amini "should be alive today".
"Instead, the United States and the Iranian people mourn her. We call on the Iranian government to end its systemic persecution of women and to allow peaceful protest," he tweeted.
Italy's Foreign Ministry called for "the perpetrators of this cowardly act" to be held to account, saying "violence against innocent people, especially women and girls, can never be tolerated".
Iranian Foreign Minister Hossein Amirabdollahian rejected the criticism, accusing the US of "shedding crocodile tears".
"An investigation was ordered into [the] tragic death of Mahsa, who, as [the] President said, was just like our own daughters," he tweeted. "To Iran, human rights are of inherent value - unlike those who see it [as] a tool against adversaries."
Iranian police released closed-circuit video footage last week purportedly showing the moment Amini collapsed. But her family says she had no history of heart trouble.
Her father Amjad Amini told an Iranian news website that witnesses saw her being shoved into a police car.
"I asked for access to [videos] from cameras inside the car as well as [the] courtyard of the police station, but they gave no answer," he said. He also accused the police of not transferring her to the hospital promptly enough, saying she could have been resuscitated.
He said that when he arrived at the hospital he was not allowed to view the body, but managed to get a glimpse of bruising on her foot.
Authorities then pressured him to bury her at night, apparently to reduce the likelihood of protests, but Amini said the family convinced them to let them bury her at 8am instead.
Amini, who was Kurdish, was buried Saturday in her home city of Saqez in western Iran. Protests erupted there after her funeral and police fired tear gas to disperse demonstrators. Several protesters were arrested.
The governor of Iran's Kurdistan province, Esmail Zarei Kousha, told Fars that three people were killed by unnamed armed groups, linking the violence to the unrest.
He did not identify the victims but said one was killed in the town of Divandarreh by a weapon not used by Iranian security forces. He said the second body was found in a car near Saqez and that the third killing was "completely" suspicious.
The province has seen past violence between Iranian security forces and Kurdish separatists.
The protests spread to Tehran and other cities. A news website affiliated with state TV said 22 people were arrested at a protest in the northern city of Rasht.
State TV showed footage of protests, including images of two police cars with their windows smashed. It said the protesters torched two motorbikes as well, and that they burned Iranian flags in Kurdish areas and Tehran.
The state-run broadcaster blamed the unrest on foreign countries and exiled opposition groups, accusing them of using Amini's death as a pretext for more economic sanctions.
Iran has seen waves of protests in recent years, mainly over a long-running economic crisis exacerbated by Western sanctions linked to the country's nuclear programme. Authorities have managed to quash the protests by force.