Iran says security forces have killed the "mastermind and main commander" of last week's attacks in Tehran that killed 17 people. ISIS had claimed responsibility for the violence at the parliament and the mausoleum of Ayatollah Ruhollah Khomeini.

Iranian Minister of Intelligence Mahmoud Alavi said over the weekend that "the terrorist had fled the country following the ensuing security operations after the attack, but was killed with the cooperation of friendly foreign intelligence services," according to the Iranian Students' News Agency.

Alavi did not give details about where the man was killed, other than to say that the commander of the five attackers had been in Iran's border region and had left the country last week.

Alavi also said that in the past three months, Iran has broken up 25 terrorist teams.

Last Wednesday's rare and coordinated attacks on Tehran left dozens of people wounded. At least some of the attackers reportedly disguised themselves by wearing women's clothing, using guns and explosives to cause mayhem at the mausoleum and parliament, or Majlis.

While ISIS claimed responsibility, Iranian officials have also suggested Saudi Arabia may have played a role — and Iran's foreign minister called the official U.S. response "repugnant," after President Trump ended his expression of condolences for the victims with the message that "states that sponsor terrorism risk falling victim to the evil they promote."

Announcing the retribution against the mastermind behind the attack, Alavi used another term for ISIS to say, "Our enemy is not Daesh, but rather Daesh is a tool in the hand of our foes," according to the Islamic Republic News Agency.

Copyright 2017 NPR. To see more, visit