The executions were carried out after PM Haider al-Abadi vowed to avenge the killing of eight captives by ISIL.

Iraq has executed a dozen members of the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) on death row, Prime Minister Haider al-Abadi’s office said on Friday, after he vowed a swift response to the armed group’s killing of eight captives.

The executions were carried out on Thursday, and came shortly after Abadi ordered the “immediate” implementation of the death sentences of hundreds of convicted fighters.

“Based on the orders of Prime Minister Haider al-Abadi, executions were carried out on Thursday of 12 convicted terrorists who have received final verdicts,” a government spokesman said in a statement.

On Wednesday, security forces found the bodies of eight men mutilated and rigged with explosives, two days after a deadline set by their ISIL kidnappers expired.

ISIL had kidnapped members of Iraq’s security forces and showed six of them in a video posted online on Saturday, threatening to kill them within three days if the government did not release female Sunni prisoners.

ISIL claimed they were Iraqi police officers or members of the Hashd al-Shaabi paramilitary force.

An interior ministry spokesman said autopsies showed the men were killed before the deadline expired and that the video was ISIL propaganda.

Abadi had earlier vowed “just retribution” against ISIL for carrying out the executions of the eight men.

More than 300 people, including around 100 foreign women, have been condemned to death in Iraq and hundreds of others to life imprisonment for membership of the ISIL group.

Most of the convicted women are reportedly from former Soviet republics, while a Russian man and a Belgian national are also on death row.

Abadi declared final victory over ISIL in December, but the group still operates from pockets along the border with Syria, and has continued to carry out ambushes, assassinations and bombings across Iraq.

Attacks by ISIL have picked up in recent weeks, especially on a highway connecting the capital, Baghdad, with the country’s north, where the men were abducted.