Iran will retaliate after an attack claimed by Islamic State on a shrine that killed 15 people, the commander of the country's elite Revolutionary Guards said on Wednesday
The assault will add pressure on the government which has faced relentless demonstrations by people from all layers of society since the death in police custody of Mahsa Amini, a 22-year-old Kurdish woman, on Sept 16.
"We firmly declare: the fire of revenge of the people of Iran will finally catch up with them and punish them for their shameful deeds," Hossein Salami was quoted as saying by the semi-official Tasnim news agency.
Iranian officials said they had arrested a gunman who carried out the attack at the Shah Cheragh shrine in the city of Shiraz. State media blamed "takfiri terrorists" - a label Tehran uses for hardline Sunni Muslim militants such as Islamic State, reports Reuters.
Islamic State, which once posed a security threat across the Middle East, has claimed previous violence in Iran, including deadly twin attacks in 2017 that targeted parliament and the tomb of the Islamic Republic's founder, Ayatollah Ruhollah Khomeini.
Wednesday's killing of Shi'ite pilgrims came on the same day that Iranian security forces clashed with increasingly strident protesters marking 40 days since Amini's death.
The demonstrations have become one of the boldest challenges to the clerical leadership since the 1979 revolution, drawing many Iranians into the streets, with some calling for the downfall of the Islamic Republic and the death of Supreme Leader Ayatollah Ali Khamenei.
The human rights group Hengaw said two young men were shot dead by police during protests in Sanandaj, capital of Kurdistan province, and the northwestern city of Mahabad during demonstrations across Iran on Wednesday. Reuters could not verify the report.
State media said a Revolutionary Guards member and a Bassij militiaman were to be buried on Thursday after being shot dead by unidentified gunmen on Tuesday in Zahedan, capital of the restive Sistan-Baluchistan province which has been a hotbed of protests by Iran's Baluch minority.
The authorities, who have accused the United States and other Western countries of fomenting what they call "riots", have yet to declare a death toll, but state media have said about 30 members of the security forces have been killed.
The activist news agency HRANA said in a posting that at least 252 protesters had been killed in the unrest, including 36 minors.
It said 30 members of the security forces were killed and more than 13,800 people had been arrested as of Wednesday in protests in 122 cities and towns and some 109 universities.
Interior Minister Ahmad Vahidi blamed the protests sweeping Iran for paving the ground for the Shiraz attack, and President Ebrahim Raisi said Iran would respond, according to state media.
CCTV footage broadcast on state TV on Thursday showed the attacker entering the shrine after hiding an assault rifle in a bag and shooting as worshippers tried to flee and hide in corridors.
He was shown being arrested by police after being shot and injured. State media said he was not Iranian, but did not give his nationality.
Officials have called three days of mourning in the southern province of Fars, after the attack in the provincial capital of Shiraz.