"Following intelligence surveillance, the identities of all five terrorists in Tehran were discovered. … There were five veteran terrorists with Wahhabi and takfiri groups who were drawn into Daesh [IS] and then exited Iran and participated in the crimes of this terrorist group in Mosul and Raqqa,” the June 8 statement from the Iranian Intelligence Ministry read, providing only the first names of the militants. "These individuals entered Iran during the terrorist operation of [the Iranian month of] Mordad [in the Iranian year] 1395 [August 2016] under the command of Abu Aisha, one of the top Daesh commanders, and intended to carry out terrorist operations in holy cities …”

While the Iranian intelligence services and the Islamic Revolutionary Guards Corps (IRGC) had prior to June 7 managed to seal off the country’s borders from attacks by IS and other militant groups, the incidents in Tehran could be the beginning of a long battle between predominantly Shiite Iran and Iranian Sunnis who have joined IS in recent years.

The attacks were the first time that IS managed to penetrate Iran’s defenses and came after the release of a video in late March in which some Iranian Sunni members of the group promised to take the war to Tehran. In the 37-minute clip, titled “Persian Land, From Yesterday to Today,” Iranian IS members list what they see as crimes against Sunnis committed by the Islamic Republic and call on their brethren to take up arms against Tehran, saying, “Our war has started against the Persians. … I call in particular on the Sunnis in Iran to prepare for this war … and we are behind you.”

In a video of the attack on parliament published by the semi-official Fars News Agency on June 8, two men with AK-47s and a man with a pistol can be seen rushing into a seating area where members of the public wait for appointments with lawmakers, indiscriminately opening fire on people.

Iran’s Intelligence Ministry on June 8 released headshots of the five perpetrators of the June 7 attacks on the parliament and the shrine of Ayatollah Ruhollah Khomeini, the founder of the Islamic Republic. The attacks in Tehran left at least 17 people dead and some 50 wounded. Al-Monitor has learned from Kurdish sources in Iran that at least four members of the two terrorist teams hailed from a Sunni Kurdish town in western Iran and spent time with Islamic State (IS) militants in Mosul.

The operation the statement refers to occurred in August in the province of Kermanshah near the Iraqi border. Two IS teams reportedly tried to enter the country; one was destroyed on the border by Iranian intelligence operatives. The other team — commanded by Abu Aisha — entered a town in Kermanshah but was later also eliminated by Iranian security forces. No other information has been provided by the media or the Iranian authorities about Abu Aisha apart from to say that he was likely killed in the August 2016 operation. The annihilation of the two IS teams came after reports in Iranian media on July 14, 2016, that the security services had in late June 2016 broken up an IS cell that had planned to carry out 50 attacks in Tehran. Ten members of the cell were detained and made confessions later aired on Iranian state television.

For the past six years, since the outbreak of the Syrian civil war, Iran has sought to fight extremist groups in Syria and Iraq, deploying thousands of troops to confront IS and other jihadis. The strategy of fighting these groups outside its borders had paid off — until June 7. Now, with the attacks in Tehran, it is clear that many radicalized Iranian Sunnis who have joined IS and other militant groups over the past six years — as well as their sympathizers inside Iran — could pose a serious threat to the country, striking at the heart of the establishment in Tehran. It is unclear what percentage of Iran is Sunni Muslim; an Atlantic magazine article last year put it at 9%.

Al-Monitor has learned that immediately after the June 7 attacks, the Iranian security services rounded up a number of suspects in the town of Paveh in Kermanshah province. Qader Qaderi, the Friday prayer imam of Paveh, condemned the attacks on his website June 8 and said that the actions of “some traitors” will not taint the sacrifices that the people of his town have made for the Islamic Republic. He said, “I was saddened for two reasons; first, for the unjust shedding of the blood of the martyrs and the wounded, and my second sorrow is because apparently some of the terrorists were from this region and this is a big calamity.” Qaderi continued, “I have pointed out many times, including last night, that we should not allow our children to be influenced by extremist thoughts and be drawn into Daesh [IS] or other groups, and I warned many times that we should be vigilant.”

On June 9, the Interior Ministry was quoted by state television as saying that “with the help of security forces and families of the suspects, 41 people linked to the attacks and to Daesh have been arrested in different provinces.”

It is difficult to gauge the number of Iranians who have joined IS. But given that four of the attackers in Tehran came from a single Sunni Kurdish town, it appears that the number could be high. Kurdish media is full of stories of groups of Iranian Kurds joining IS and al-Qaeda-linked Jabhat Fatah al-Sham, previously known as Jabhat al-Nusra. Indeed, IS-affiliated Kurdish channels on the popular smartphone messaging app Telegram have published dozens of videos of Iranian Kurds after their arrival in Mosul and Raqqa.

According to political activist Mokhtar Hooshmand, who was jailed in Iran for his activities and met many Sunni extremists during his detention, some 150 Iranian Kurds had joined IS by early 2016. Hooshmand, who now researches jihadi ideology among Kurds, says that by comparison, there were around 700 Iraqi Kurds in IS at that time. He argues that Salafi ideology has been spreading in Iranian Kurdistan over the past two decades and that the Iranian authorities have to an extent turned a blind eye to Salafi activities — though he claims that there are around 150 Salafi Kurds held in prisons across Iran, while the Islamic Republic has executed a number of Salafi Kurds. In Hooshmand’s telling, some of the Kurds who have joined various jihadi groups, including al-Qaeda and IS, have reached senior military positions. Moreover, a number of clerics in Iran’s Kurdish areas are known to have pledged allegiance to IS.

In April, this author argued in an article for Al-Monitor that Iran could face potential threats from citizens who have joined IS and other extremist groups as the caliphate in Iraq and Syria crumbles. While Iranian officials have tried to downplay the threat by IS, with Supreme Leader Ayatollah Ali Khamenei on June 7 dismissing the attacks in Tehran as “fireworks,” the threat to Iran could be serious.

“I have a message for the Rawafidh [‘rejectionists,' a derogatory term for Shiites]; for the infidel peshmerga; for the Jews and Christians: Be aware that we love death the way you love life. One day, we will come to you and blow ourselves up among you. ... We are not scared of death … even if my father and brother oppose me, I will make no distinction between them and the Rawafidh," an Iranian Kurd eerily warned in an undated video on the Telegram channel of IS.

Indeed, IS released a video late on June 8 that purported to show the five attackers. It said, “This is a message from a unit of the soldiers of the Islamic State ... in Iran. ... With the blessing of Allah this unit will ignite jihad, and we hope our dear brothers will follow suit,” a balaclava-wearing man uttered in the Sorani dialect of Kurdish as he held the barrel of an AK-47 with his left hand and waved a pistol with his right hand. Four other men listened quietly at the unidentified location as the speaker made threats against Tehran, describing the country as “one of the hands of the Jews in the Middle East.” Now, only time will tell whether the end of the wars in Iraq and Syria will usher in the beginning of a sectarian conflict in Iran.