Iraq has put to death 13 people convicted of terrorism offences hours after the prime minister, Haider al-Abadi, ordered the execution of hundreds of prisoners on death row in retaliation for the killing by Isis of eight members of the security forces.

The hangings are aimed at quelling public anger over signs that Isis is re-emerging as a threat after the group showed eight captives, who were badly bruised and looked as if they had been severely beaten, on a video last weekend and said that they would be killed unless Sunni women prisoners were released by the government within three days.

The government says that autopsies on the bodies of dead men, six of whom belonged to the logistics department of the paramilitary Hashd al-Shaabi, or Popular Committees, showed that they were shot and killed before this deadline expired.

An Iraqi government official, speaking to The Independent just before the discovery of the bodies, said that Isis fighters targeting the main Baghdad-Kirkuk road were based in the rugged Hamrin mountains, a traditional Isis stronghold.

Isis suicide bombers based in the Syrian border area are continually trying to reach Baghdad but “so far they have failed”.

He added that Iraqi security forces now have good intelligence about Isis plans and personnel after luring back to Iraq five senior Isis leaders it had captured and interrogated. It appears Isis is keen to revert to guerrilla war similar to that which it waged successfully before its explosive expansion when it captured Mosul in 2014, but so far it has had only limited success.

Isis advances are mainly in Diyala, Salahudin and Kirkuk provinces north of Baghdad where Isis fighters can often recruit local guides from Sunni displaced from their villages who are looking to return.

Ahmed Abdul Jabbar al-Kraiym, head of the Salahudin provincial council, said at a press conference this week that dozens of people have been killed and kidnapped in Salahudin.

He warned of “a catastrophic situation in the province if the government does not deal with the increasing presence of Daesh (Isis) militants, as some families have started to leave their homes because of the extremist militants”.

Blaming the government and security forces for the deterioration of the security situation in his province, Mr Kraiym said that the security forces “are busy with smuggling fuel and taking bribes from the citizens at checkpoints, while neglecting the security file”.

Iraqi Christians celebrate liberation from Isis Show all 10 1 /10 Iraqi Christians celebrate liberation from Isis Iraqi Christians celebrate liberation from Isis Iraqi Christians celebrate liberation from Isis An Iraqi Christian prepares for the first Sunday Mass at the Church of the Immaculate Conception in Qaraqosh Reuters Iraqi Christians celebrate liberation from Isis Iraqi Christians celebrate liberation from Isis Iraqi priests hold the first Sunday mass Reuters Iraqi Christians celebrate liberation from Isis Iraqi Christians celebrate liberation from Isis Iraqi Christian soldiers attend the first Sunday mass at the Grand Immaculate Church since it was recaptured from Islamic State in Qaraqosh Reuters Iraqi Christians celebrate liberation from Isis Iraqi Christians celebrate liberation from Isis An Iraqi Christian soldier holds his weapon during the first Sunday mass Reuters Iraqi Christians celebrate liberation from Isis Iraqi Christians celebrate liberation from Isis An Iraqi Christian soldier lights a candle Reuters Iraqi Christians celebrate liberation from Isis Iraqi Christians celebrate liberation from Isis Iraqi priests hold the first Sunday mass at the Grand Immaculate Church since it was recaptured from Islamic State Reuters Iraqi Christians celebrate liberation from Isis Iraqi Christians celebrate liberation from Isis Iraqi priests hold the first Sunday mass Reuters Iraqi Christians celebrate liberation from Isis Iraqi Christians celebrate liberation from Isis Iraqi Christian soldiers attend the first Sunday mass at the Grand Immaculate Church since it was recaptured from Islamic State in Qaraqosh, near Mosul in Iraq October 30, 2016. REUTERS/Ahmed Jadallah - RTX2R245 Reuters Iraqi Christians celebrate liberation from Isis Iraqi Christians celebrate liberation from Isis An Iraqi Christian soldier attends the first Sunday mass at the Grand Immaculate Church since it was recaptured from Islamic State in Qaraqosh, near Mosul in Iraq October 30, 2016. REUTERS/Ahmed Jadallah - RTX2R256 Reuters Iraqi Christians celebrate liberation from Isis Iraqi Christians celebrate liberation from Isis Iraqi Christian soldiers attend the first Sunday mass at the Grand Immaculate Church since it was recaptured from Islamic State in Qaraqosh, near Mosul in Iraq October 30, 2016. REUTERS/Ahmed Jadallah - RTX2R269 Reuters

The kidnapping on the main road north of Baghdad and the discovery of the eight mutilated bodies, which were booby-trapped with explosives, is reawakening fears that political leaders have been diverted from finishing off Isis by the jockeying for power by different parties before and after the general election in May.

To prove that it is reacting forcefully, the Iraqi authorities for the first time on Friday released pictures of the condemned men, dressed in yellow or black, blindfolded and facing a wall with their wrists handcuffed behind their backs, as well as a picture of the actual hanging.

Earlier Mr Abadi had called for “just retribution” against all prisoners sentenced to death for terrorism who had exhausted the appeals process. The government has not said how many prisoners might be executed, but the number on death row is reported to number 300, of whom 100 are foreign women convicted of belonging to Isis.

The number for those already executed is also unknown, according to Belkis Wille, the Baghdad-based senior Iraq and Qatar researcher for Human Rights Watch.

She said that a serious concern is that “the vast majority of cases rely solely on confessions and that torture is extensively practised to extract these confessions”.

Schools Under Attack: inside the West Mosul school stuck between Iraqi forces and ISIS fighting

She said that despite this, lawyers for the accused have told her that appeals against death sentences on the grounds that the accused were tortured into confessing are almost always rejected by the courts.

By one estimate, the Iraqi security forces have taken 20,000 prisoners in the past three years of its anti-Isis campaign.

Violence has ebbed swiftly over the past year after Isis was defeated when it lost Mosul and Raqqa, its de facto capitals in Iraq and Syria, which were both captured after long and destructive sieges in the second half of last year.

Isis today only controls a few pockets of territory, the largest of which is in Deir Ezzor province in eastern Syria, close to the Iraqi border.

Anxiety is growing that Isis is not completely finished and is taking advantage of political divisions in Iraq after the inconclusive election in May, fears expressed on Friday by the supreme Shia religious authority Grand Ayatollah Ali al-Sistani through his representative in the holy city of Kerbala.