Tehran says those executed were directly involved in the June 7 assault that killed at least 18 people in the city.

Iran has executed eight people over the 2017 attack on Tehran’s parliament and Ayatollah Khomeini mausoleum, according to the judiciary’s official Mizan news agency.

The news agency reported on Saturday that eight members of the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group, which claimed the attack, were hanged.

Those executed were Soleiman Mozafari, Esmail Sufi, Rahman Behrouz, Majed Mortezai, Sirous Azizi, Ayoub Esmaili, Khosro Ramezani and Osman Behrouz.

The June 7, 2017, attack, in which at least 18 people were killed, has so far been the only assault by ISIL inside Iran.

During the attack, four armed assailants stormed the parliament complex where a legislative session was in progress, starting an hours-long siege.

Meanwhile, gunmen and suicide bombers also struck outside Khomeini’s mausoleum on Tehran’s southern outskirts.

Information on when the executions took place was not provided, but Mizan described the activities of each of the eight people in detail.

It identified Soleiman Mozafari – born Amin Hosseini – as the main organiser of the attack. Esmail Sufi played an important role in recruiting other team members, according to Mizan.

Iran’s Revolutionary Guard responded by launching six missiles against ISIL in Syria [File: AFP]

Iran has long been fighting against ISIL in Iraq and Syria. However, unlike many Western and Middle Eastern countries, Iran had not faced any ISIL attacks within its borders until the June attack.

Iran’s paramilitary Revolutionary Guard responded to the attack by launching six missiles into eastern Syria, targeting ISIL.