"The five attackers were Iranians ... They earlier left Iran and were involved in the crimes of the terrorist group in Raqqa and Mosul," the ministry said according to state news agency IRNA, referring to Islamic State's effective capital in Syria and a city it captured in Iraq.
"Last year, they returned to Iran ... to carry out terrorist attacks in the holy cities of Iran."
Islamic State claimed responsibility for suicide bombings and gun attacks in Tehran on Wednesday, that killed 17 people.
For more details, watch the full report in the video above