“My thoughts and prayers go out to all Iranian people as well as the families of a host of pilgrims at the … shrine who were killed or wounded in this terrorist attack,” said Ebrahim Raisi in a message.
He said the enemies of Iran use violence and terror to make up for their desperation and failure to sow discord among Iranians.
“This wicked act will definitely not go unanswered,” the president added.
“Iranian security and law enforcement agencies will identify those behind this act of terror, and will give those ordering and masterminding the attack a response that will make them rue the day and serve as an object lesson to them, President Raisi said.
A terrorist attack on a holy shrine in the city of Shiraz in southern Fars Province on Thursday evening left at least 15 people dead and over 40 others wounded.
The ISIS terrorist group claimed responsibility.
Reports say, a gunman started shooting from one of the entrances of the Shah Cheragh shrine in Shiraz.
He then headed to the main compound firing at pilgrims and staff.
Officials say the perpetrator has been arrested and an investigation has got underway into the incident.
Earlier reports suggested two had been arrested while another one was on the run.