In the early hours of June 7, a group of six people — five men and one woman — launched coordinated terrorist attacks against two sites in Tehran, hitting the Iranian Parliament and the mausoleum of the Islamic Republic’s founder, Ayatollah Ruhollah Khomeini. Witnesses at the Parliament described attackers who were armed with assault rifles and wearing suicide vests, randomly targeting bystanders on a Wednesday morning. By the time that security forces were able to neutralize the attackers, at least 12 civilians lay dead, with another 42 reported wounded. The atrocity was claimed almost immediately by the Islamic State, in an online statement that also included video footage taken from the scene of the attacks.

While the Middle East has been ravaged by over a decade of terrorist attacks from ISIS, Al Qaeda, and other terrorists groups, Iran has largely escaped deadly incidents like the one that struck Tehran on Wednesday. In a statement responding to the incident, the Iranian Revolutionary Guard Corps suggested that “mercenaries” working on behalf of Saudi Arabia and the United States were responsible, vowing to take revenge.

Along with targeting civilians in a city long considered to be safe from terrorism, however, the Islamic State’s first attack in Iran also seemed designed to further aggravate tensions in the Persian Gulf region. On his recent visit to Saudi Arabia, President Donald Trump endorsed the virulently anti-Iranian stance of the ruling Saudi monarchy and seemed to go out of his way to fan regional tensions rather than temper them. Trump’s messages on that trip were reasonably interpreted by many as giving a green light for Saudi leaders to take aggressive action against Iran. But while there is no evidence to suggest a direct Saudi role in the terrorist attack in Tehran, even the suspicion of Saudi involvement during a period of high tension between the two countries could have major consequences.

An armed man stands in a window of the parliament building in Tehran, Iran, Wednesday, June 7, 2017. Several attackers stormed into Iran's parliament and a suicide bomber targeted the shrine of Ayatollah Ruhollah Khomeini on Wednesday, killing a security guard and wounding several other people in rare twin attacks, with the shooting at the legislature still underway. (Fars News Agency, Omid Vahabzadeh via AP)

An armed man stands in a window of the Parliament building in Tehran, Iran, June 7, 2017.

Photo: Omid Vahabzadeh/Fars News Agency/AP

“If this attack had happened at any other time, Iran would probably deal with it internally and their response would not be that different from how other countries have responded to ISIS attacks,” said Afshon Ostovar, an assistant professor of national security affairs at the Naval Postgraduate School and author of “Vanguard of the Imam: Religion, Politics and Iran’s Revolutionary Guard Corps.” “But coming on the heels of this sort of mounting pressure from their rivals across the Gulf, the timing is very ripe for some kind of Iranian reaction. There are probably people within the [Iranian Revolutionary Guard Corps] who do believe that it was the Saudis who were behind this somehow.”

While it’s unclear what kind of retaliation the IRGC might employ, its reaction would not necessarily have to involve attacking the Saudi homeland. Over the past several years, Iran and Saudi Arabia have been waging a brutal proxy war across the Middle East, with active conflicts in Syria, Iraq, and Yemen. Iran could easily escalate in any one of these conflict zones, targeting Saudi allies or personnel. A major escalation in any of these conflicts would be even more dangerous because the United States is increasingly an active belligerent in all these countries, having escalated its direct support for Saudi-allied forces since Trump’s election.

In recent weeks in Syria, U.S. forces have even targeted Iranian-backed militia groups with airstrikes on three separate occasions, attacks that by some accounts killed scores of fighters. While these groups have not yet reacted by targeting American forces, it’s not implausible for this to happen in the near future, in Syria or another country, if tensions continue to rise.

“This is the first time the U.S. and Iranian-backed groups have been at the knife’s edge of conflict in Syria,” said Ostovar. “If the IRGC does retaliate and the conflict in the region intensifies, you could eventually see things like green-on-blue attacks against U.S. troops in Iraq by [Iranian-backed militias], a development that would seriously complicate the campaign against ISIS.”

Why Jihadis Are Striking Iran Now

The growing threat of terrorism in Iran is another factor that could escalate conflict in the Middle East, even after ISIS is driven out of its last territorial holdings in Iraq and Syria. Over the past decade, Iran was largely insulated from terrorist attacks, a respite that some claim stems from older arrangements made by Iran with Al Qaeda leaders in the years after the 9/11 attacks.

The body at background left, lies on the ground while police control the scene at the shrine of late Iranian revolutionary founder Ayatollah Khomeini, just outside Tehran, Iran, Wednesday, June 7, 2017. Several attackers stormed into Iran's parliament and a suicide bomber targeted the shrine of Ayatollah Ruhollah Khomeini on Wednesday, killing a security guard and wounding 12 other people in rare twin attacks, with the shooting at the legislature still underway. (AP Photo/Ebrahim Noroozi)

A body, at background left, lies on the ground while police control the scene at the shrine of late Iranian revolutionary founder Ayatollah Khomeini, just outside Tehran, Iran, June 7, 2017.

Photo: Ebrahim Noroozi/AP

While the idea of coordination between some Sunni extremist groups and Shia-led Iran may appear far-fetched, there could be something to these claims. Following the 2001 U.S. invasion of Afghanistan, many high-ranking members of Al Qaeda and their families fled to exile in Iran, where they spent years living under house arrest overseen by the IRGC. During this time, a tacit agreement was reportedly reached between the terrorist group and their Iranian captors, with Al Qaeda allegedly refraining from attacking within Iran in exchange for continued asylum for its leaders. A recent book about this period by British journalists Cathy Scott-Clark and Adrian Levy, “The Exile,” documents this strange period in recent history, interviewing former Al Qaeda members who lived in Iran about their dealings with the IRGC.

As the book describes it, the reception the exiles received in Iran was relatively positive. During the years that Al Qaeda leaders and their families spent in the country, IRGC commanders ensured their safety and privacy. Although their relationship was sometimes contentious, the Iranians also occasionally went out of their way to keep their Al Qaeda exiles happy, providing them with creature comforts and even taking them and their families to visit tourist sites around the country.

Iran may not have been the only country that sought to make similar arrangements with al Qaeda. A letter recovered from Osama bin Laden’s Abbottabad compound suggested that British intelligence had also reached out to intermediaries with al Qaeda to help mediate an agreement in which the British, “would leave Afghanistan if al Qaida promised not to target their interests.” It is unclear from the available correspondence where these discussions led, or even whether al Qaeda had accepted the offer as legitimate.

Over the years, the exiles in Iran were periodically released or repatriated, with some eventually ending up in U.S. custody. In 2015, Iran released several top members of Al Qaeda’s military leadership (who then traveled to Syria), reportedly in exchange for the release of a captive Iranian diplomat in Yemen. The purported trade could be seen as Iran departing with a major bargaining chip held against regional jihadist movements.

“The post-9/11 exile of Al Qaeda figures to Iran was really puzzling, as Iran was at odds with Al Qaeda politically and ideologically and they were really taking a huge risk by allowing them to operate in the country,” said Ostovar. “Although they may have gotten some intelligence out of it and a ‘gentleman’s agreement’ not to conduct attacks inside Iran, in the end the exiles did not prove to be that useful and were perhaps more of a liability.”

The Saudi Free Hand

Although Iran may have received some protection from terrorism through its Al Qaeda captives, there’s little indication that it now has any similar leverage to protect against Islamic State attacks on its territory. And if terrorism does increase in the Iranian homeland, it is very likely that the IRGC will decide that the blame for that lies with Saudi Arabia, a country whose leadership has made public statements threatening to bring “the battle” to the Iranian homeland and which is frequently accused by Iranian leaders of supporting Islamic State.

“I consider it a worst-case scenario, but I would not rule out some kind of asymmetric attack against Saudi Arabia by Iran in retaliation for what happened in Tehran,” said Paul Pillar, a nonresident senior fellow at the Center for Security Studies at Georgetown University and former CIA analyst. “This was a very carefully planned operation and I suspect it was in the works well before the Trump trip. But due to the timing, I’m sure that there are people within the IRGC who sincerely believe that Saudi was involved.”

Following Trump’s trip to Saudi Arabia, there is a widespread perception that the U.S. government has given a blank check to its Gulf Arab allies to pursue aggressive actions across the Middle East. In recent weeks, Bahrain’s government escalated its crackdown on domestic dissent, while the United Arab Emirates has spearheaded the campaign to isolate Qatar over its support of regional Islamist movements.

But the burgeoning hostilities between Saudi Arabia and Iran have the potential to be the most dangerous of all these situations. Any confrontation between the two powers that rises to the level of even limited armed conflict could threaten oil shipments and critical infrastructure in the Persian Gulf, with implications for global economic stability. While the U.S. has historically sought to control the Saudi-Iran rivalry for this reason, under Trump the United States seems to be adding fuel to the fire by backing Saudi efforts to confront Iran at any cost.

“The United States has an interest in stability in the Gulf region and it has an interest in promoting peaceful relations between the Saudis and Iranians. But instead of doing that, we’ve been stoking tensions, which was the main theme of Trump’s trip to Saudi Arabia,” said Pillar. “It’s very saddening to see how much the Trump administration is giving the green light to the worst Saudi inclinations.”

Top photo: Police officers control the scene around the shrine of late Iranian revolutionary founder Ayatollah Khomeini after an assault by several attackers in Tehran, Iran, June 7, 2017.