As all acts of terrorism go, Wednesday's twin attacks, carried out by the Islamic State against Iran's parliament and the tomb of the Islamic Republic's founder, were heinous crimes that shed the blood of defenseless civilians.

The attacks drew condemnations from heads of state and political figures across the world. President Trump also reminded that "states that sponsor terrorism risk falling victim to the evil they promote," a reference to Iran's destabilizing role in the region.

However, the difference between an attack taking place in Tehran and recent terrorist attacks in London and Manchester is that the Iranian regime is not a victim but a beneficiary, and will use it to justify suppressing dissent and expanding its nefarious agendas in the region.

The Islamic State clearly owes its rise to Tehran. The violence caused by Iran's Revolutionary Guards and its affiliates in Iraq and Syria created the perfect breeding ground for the emergence of the Islamic State and allowed it to occupy large swathes of land in both countries.

Reciprocally, the Islamic State returned the favor, causing rampage that provided Iran with the perfect excuse to increase its meddling in neighboring countries. Under the pretext of fighting the Islamic State, Tehran founded and legalized the Popular Mobilization Forces, an umbrella for extremist Shiite groups backed by Iran. The Islamic State also became Iran's excuse to openly intervene in the Syrian conflict and shore up the Assad regime against opposition forces.

This symbiotic relationship between the Iranian regime and the Islamic State has always prevented them from making any moves that would threaten the other's existence. Iran has a history of giving safe haven to Sunni extremist groups and their leaders, its supposed nemesis. And there are reports of Iran's forces de-conflicting and colluding with Islamic State forces in Syria in order to weaken opposition forces.

Accordingly, the latest spate of Islamic State attacks happened while the Iranian regime is dealing with setbacks on several fronts. Social protests across the country are increasing and the Iranian people are becoming bolder in expressing their desire for freedom and regime change. Tehran is also faced with isolation because of its terrorist meddling in the affairs of the countries of the region.

Again, the brutality of the Islamic State will provide the regime of Tehran with a potential way to avoid sinking deeper into its current crises.

In a statement that condemned the Islamic State attacks, Iranian opposition leader Maryam Rajavi reminded that, "ISIS's conduct clearly benefits the Iranian regime's Supreme Leader Khamenei, who wholeheartedly welcomes it as an opportunity to overcome his regime's regional and international impasse and isolation. The founder and the number one state sponsor of terror is thus trying to switch the place of murderer and the victim and portray the central banker of terrorism as a victim."

Following the attacks, Ali Khamenei, the Supreme Leader of the Iranian regime, seized the opportunity to legitimize Tehran's involvement in Syria and Iraq. Speaking at a student gathering, he said, "These events show that if the Islamic Republic wouldn't make a stand in the center of the sedition [reference to Syria and Iraq], we would have many more trouble inside Iran."

During the same event, he gave a "fire at will" order to his suppressive forces to "maintain security," an excuse the regime regularly uses to crack down on dissent and protests.

Terrorism breeds its own kind, and the Iranian regime will try to exploit the situation to its benefit and to the detriment of its people and the countries of the region.

This is a reminder that Iran is not part of the solution in fighting the Islamic State or other extremist groups. Islamic fundamentalism can only be eradicated if it is fought in its entirety. This will require the eviction of the Iranian regime and the Revolutionary Guards from the region and the total dismantling of its terrorist proxies.

Until the international community acknowledges this reality and takes concrete action in this regard, terrorist attacks will continue to take place across the world, victimizing innocent people and benefiting the extremist leaders of the Islamic State and Tehran.

Amir Basiri (@amir_bas) is a contributor to the Washington Examiner's Beltway Confidential blog. He is an Iranian human rights activist.

If you would like to write an op-ed for the Washington Examiner, please read our guidelines on submissions here.