Around 20,000 were arrested in a three-year battle by Iraqi forces to drive out IS, which had seized western and northern Iraq in 2014.
Baghdad: Iraq said on Friday that it executed 13 death row jihadists after Prime Minister Haider al-Abadi vowed a forceful retaliation to calm public anger over the Islamic State group's murder of abducted civilians.
While Iraqis have grown accustomed to the atrocities committed by IS, the killing of the eight civilians shocked the nation and doused hopes the jihadists had been defeated.
For the first time, the authorities released photographs of the hangings, which came after Abadi on Thursday ordered the "immediate" executions of hundreds of convicted jihadists.
The justice ministry said Friday that the 13 convicts put to death at a prison in southern Iraq "had participated in armed operations with terrorist groups, in kidnappings, bombings and murders of civilians".
It said that another group of 64 convicts could also be put to death after they lost an appeal for a stay of execution.
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 IS, a judicial source said in April.
Abadi faced harsh criticism on social networks by Iraqis who accused him of failing to respond in force to the jihadists.
On Friday Iraq's top Shiite cleric Ayatollah Ali Sistani joined the fray, blaming the government for failing "to take into consideration appeals by families to act quickly and save" the victims.
Under pressure, Abadi on Thursday ordered "the immediate punishment of terrorists condemned to death" whose appeals have been exhausted, his office said.
A photograph released by the justice ministry showed a group of blindfolded and handcuffed men sitting on the floor waiting to be executed.
Another showed several convicts being hanged at the prison in Nasiriyah.
Abadi vowed to avenge the deaths of the eight civilians held captive by IS, after their bodies were found along a highway north of Baghdad.
"Our security and military forces will take forceful revenge against these terrorist cells," he told senior military officials and ministers. "We promise that we will kill or arrest those who committed this crime," he added.
Six of the abductees -- civilians working in the logistics department of the Hashed al-Shaabi paramilitary force that helped defeat the jihadists -- had appeared in an IS video released on Saturday with badly bruised faces.
IS had threatened to execute their captives unless Baghdad released Sunni Muslim women held in its prisons.
Iraq declared victory over IS in December after expelling the jihadists from all major towns and cities in a vast offensive.
But the Iraqi military has kept up operations targeting mostly remote desert areas from where jihadists have continued to carry out attacks.
"We had warned that the battle against Daesh (IS) was not over, even if the group was broken," Abdel Mahdi Karbalai, a representative of Sistani, said during a sermon at Friday prayers.
He called for bolstering the army and intelligence services in order to "eliminate the terrorists and guarantee protection and security" for the population.
Iraq, which has repeatedly faced criticism over the high number of death sentences handed down by its anti-terrorist courts, hanged at least 111 convicts in 2017.
Around 20,000 people were arrested in the three-year battle by Iraqi forces to drive out IS, which had seized swathes of western and northern Iraq in 2014.
Human Rights Watch denounced the latest executions, with senior Iraq researcher Belkis Wille saying they "reek of revenge rather than justice".
"These executions are particularly troubling given the flaws we documented" at trials of suspected jihadists, Wille said, calling for "justice based on fairness and individualised guilt."
Last week, HRW urged Iraq's judiciary to deal with foreign women and children affiliated with IS on a case-by-case basis instead of slapping them with "one size fits all" sentences.
Since January Iraq's judiciary "proceeded with rushed trials against foreigners on charges of illegal entry and membership in or assistance" to IS, said the rights watchdog.
Most foreign women had been sentenced to death or life in prison and children aged nine and above to between five and 15 years in jail for taking part in violent acts, it said.