Attack claimed by Daesh targeted Shah Cheragh mausoleum in the south-central city, state media say, leaving at least 15 dead and 40 others wounded.
Gunmen have opened fire at a major Shia holy site in the southern city of Shiraz, killing at least 15 people and wounding dozens.
The official website of the judiciary said two gunmen were arrested and a third is on the run after Wednesday’s attack on the Shah Cheragh mosque.
The state-run IRNA news agency reported a death toll of 15 and state TV said 40 people were wounded.
State TV blamed the attack on “takfiris,” a label Tehran uses for hardline Sunni militants.
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.
“Experience shows that Iran’s enemies, after failing to create a split in the nation’s united ranks, take revenge through violence and terror,” said Raisi, speaking before Daesh released its claim of responsibility.
“This crime will definitely not go unanswered, and the security and law enforcement forces will teach a lesson to those who designed and carried out the attack.”
A witness at Shah Cheragh told state television: “I heard sounds of gunfire after we prayed. We went to a room next to the shrine, this lowlife came and fired a barrage of shots. Then (the bullet) hit my arm and leg, it hit my wife’s back, but thank God my child was not hit, he is seven years old.”
The attack appeared to be unrelated to the demonstrations over Mahsa Amini’s custodial death.
An Iranian news website considered to be close to the Supreme National Security Council reported that the attackers were foreign nationals, without elaborating.
Shah Cheragh shrine, which houses the grave of a revered Shia scholar, is a popular pilgrim destination in southern Iran, thronged by both local and foreign pilgrims.
Such attacks are rare in Iran, but last April, an assailant stabbed two clerics to death at the Imam Reza shrine, the country’s most revered Shia site, in the northeast city of Mashhad.