Last Wednesday morning, five Sunni militants attacked the Iranian parliament and the mausoleum of the Islamic Republic of Iran’s founder, Ayatollah Ruhollah Khomeini. Iranian state media reported that 17 were killed in the attacks, including all five assailants.

The Tehran attacks were separate but simultaneous, and the Islamic State immediately claimed responsibility; according to al-Naba, a weekly Islamic State newsletter produced in Arabic, two militants attacked the mausoleum and three others stormed the parliament, filming this part of the operation and later releasing the footage.

In another video shot before the attacks, the five new members reaffirmed their allegiance to the international organization. A speaker in the video claimed the group was the first katibah (brigade) to be formed in Iran and that it “will not be the last,” suggesting that the five-member cell was the only one in operation inside Iran at the time of the attacks. However, in March of this year, the Islamic State announced a katibah dedicated to launching attacks in Iran, and purported to show 16 members. This March announcement named the brigade Salman al-Farsi, after a companion of Prophet Mohammed, revered by both Shi’a and Sunni.

The attacks, three months after the release of the 36-minute Salman al-Farsi video and at a time when its caliphate in Iraq and Syria is crumbling, signal a focus for the Islamic State on Iran as a critical battlefield.

Unprecedented attack

A declaration of war against Iran is unprecedented in jihadist history. Even though Iranian proxies have been featured prominently in the propaganda of both the Islamic State and jihadists affiliated to al-Qaeda in Syria, Iran had been out of focus as an explicit target for these groups.

The dearth of jihadist activity against Iran is often attributed to ties Tehran has cultivated with senior jihadist operatives who historically benefited from Iran for logistics and mobility. In a 2007 letter addressed to al-Qaeda in Iraq by Osama bin Laden, the organization’s former leader wrote: “Iran is our main artery for funds, personnel, and communication, as well as the matter of hostages.” Abu Musab al-Zarqawi, the founder of what is today the Islamic State, travelled from Afghanistan through Iran to northern Iraq in 2002, as did other operatives fleeing the war against the Taliban in Afghanistan.

Indeed, the bin Laden letter stops short of explicitly suggesting collision between al-Qaeda and Iran, advising jihadists in Iraq to refrain from attacking Iran (as well as other countries like Turkey and Lebanon). The reason, as explained by bin Laden, is related to the cost of a crackdown by Iran against the mujahideen. “There is no need to fight with Iran, unless you are forced to because of the great harm caused by them,” bin Laden wrote.

The Islamic State, however, attributed the lack of jihadist attacks in Iran to a deal between Tehran and al-Qaeda’s leadership. The group’s former spokesman made the accusation in a speech delivered one month before the Islamic State announced its global caliphate in June 2014. Abu Muhammad al-Adnani, killed in an American strike last August, first explained that the Islamic State did not strike the Shi’a in Iran “in compliance with al-Qaeda’s order to maintain its interests and supply lines.”

Al-Adnani went on to explain why his group still did not attack Iran even after al-Qaeda in Iraq dissolved itself in January 2006 and was thus no longer part of al-Qaeda. (The abrogation of the oath of allegiance by the subsequent formation of the Islamic State of Iraq was at the heart of the dispute between the two organizations in 2013, and the Islamic State has since denied it was part of al-Qaeda since October 2006.) Al-Adnani said the command-and-control relationship ended in 2006 but courteous links remained between the two organizations to maintain global jihadist unity, to “preserve the cohesion of the mujahideen and to unify their ranks.”

He concluded, “History shall record that al-Qaeda owed a hefty debt to Iran.”

Why Iran

Thus, there are three aims for the Tehran attacks. First, the group seeks to “refute” frequent accusations of collaboration with the Iranians. In the video shot before the twin operation, the speaker stressed that the group was not an agent to Iran or Saudi Arabia, after threatening further attacks against the two countries. “We are agents for no one,” he said. “We are fighting for this religion, not for Iran or the Arabian Peninsula.”

He was addressing common critique from fellow jihadists, ordinary people, and even politicians that the lack of attacks against Iran since the group’s establishment, despite the proximity, was an indication of collaboration. Also, mentioning Saudi Arabia was also an attempt to defend the group against accusations in Iran of being a Saudi proxy.

The second aim is rivalry with al-Qaeda. Since the establishment of the caliphate in 2014, the Islamic State has sought to replace al-Qaeda and present itself as the leader of global jihad. Al-Adnani’s speech, the release in March, and the attack this month are framed as a repudiation of al-Qaeda’s credibility in the jihadist worldview.

Related to the second reason is the continuing aim of tapping into the niche market of sectarianism in the Middle East. The Islamic State, unlike al-Qaeda, has no qualms in targeting Shi’a mosques and ordinary Shi’a civilians. One of the militants in the Tehran attacks reiterated a frequent theme in the Islamic State’s propaganda: “We will not hesitate to apostatize the Shia, specifically and as a whole, and kill them.”

Yet, the fact that it took three years since the Adnani statement for the Islamic State to carry out the two strikes in Tehran, in addition to the paucity of Iranian militants fighting with the group, indicate the organization has so far failed to build the infrastructure for sustained attacks inside the Islamic Republic, both because Sunni Iranians make up less than 10 percent of the population and because the group has struggled to carve out a significant support base in stable countries in the region. Even in predominantly Sunni countries like Saudi Arabia, the Islamic State has failed to recruit large numbers capable of conducting a sustained insurrection, especially considering the heavy investment it has made in terms of ideological and political messaging. The group’s poor record in these countries means that the delay in carrying out attacks in Iran is hardly surprising.

Reclaiming the Mantle of Sectarianism

The Islamic State will focus on sectarianism to maintain and expand its relevance as it loses control of its territories in Iraq and Syria. Even when its appeal is undermined as the group is rolled back militarily, sectarianism will continue to provide the group with growth opportunities in a region beset with deepening sectarian divisions. The increasing role of Iran in countries like Iraq and Syria will strengthen its appeal to individuals and groups that see Iran as the usurper of their lands. Regardless of what happens to the Islamic State in its core in Iraq and Syria, sectarianism will likely remain its inexhaustible spring.

The Islamic State’s attempts to reclaim the mantle of militant Sunnism extends beyond Shi’a, to demographics such as the Coptic Christians in Egypt. The increasing focus on targeting Egyptian Christians—from the beheading videos in Libya to the recent church and bus attacks—is part of the group’s strategy to exploit and deepen social divisions. This attacking of Shi’a and Coptic civilians, much like the enslavement of Yazidis in 2014, is unique to the group, and even al-Qaeda distances itself from such acts.

The aim of the Islamic State’s attacks in Iran is not to threaten the Iranian state and force authorities to dial down their role in countries like Iraq and Syria. On the contrary, the Islamic State hopes for a more pronounced Iranian role in the region. The target audience is not Iran, but people in the region who increasingly view Iran as an enemy. In this context, the Islamic State hopes to have an advantage over its Sunni detractors—from al-Qaeda to Saudi Arabia—as they fail to push back against militant Sunnism’s enemy number one.