Human Rights Watch in a report on Tuesday criticised Iraq and the autonomous Kurdish authorities over mass trials of suspected Islamic State group jihadists.
In "Flawed Justice: Accountability for ISIS Crimes in Iraq", HRW said Baghdad and the Kurdish authorities in the north were holding "thousands of trials of Islamic State suspects without a strategy to prioritise the worst abuses under Iraqi and international law".
"The broad prosecution under terrorism law of all those affiliated with ISIS (IS) in any way, no matter how minimal, could impede future community reconciliation and reintegration, and clog up Iraqi courts and prisons for decades," the New York-based group said.
Sarah Leah Whitson, HRW's Middle East director, said that in acting this way, "Iraqi justice is failing to distinguish between the culpability of doctors who protected lives under ISIS rule and those responsible for crimes against humanity".
The group said the authorities "appear to be prosecuting all ISIS suspects in their custody under counterterrorism laws, primarily for ISIS membership, and not focusing on specific actions or crimes that may have been committed".
HRW identified 7,374 cases of suspects charged under this law since 2014, of whom 92 have been executed.
Its researchers estimate the total number of people imprisoned for suspected IS membership at 20,000.
Anti-terrorism laws allow judges to charge a large number of people, even those not involved in violence but who are suspected of having helped IS, such as doctors who worked in hospitals or cooks who fed fighters.
HRW said it was easier to charge a suspect under anti-terrorism laws than with a specific offence under the penal code as all the authorities had to do was to prove IS membership.
It said counterterrorism laws carry harsh sentences, including life in prison or the death penalty, even for belonging to the jihadist group.
"But that makes it more difficult to prioritise and punish the most serious crimes," it said.
HRW also believes the authorities "have made no efforts to solicit victim participation in the trials, even as witnesses".
It said the report was based on information gathered in Arbil and Baghdad between November 2016 and July 2017.
HRW also said it regretted that a 2016 Iraqi law granting amnesty to suspects who can show they joined IS or any extremist group against their will and have not committed a crime was not being consistently applied.
"Execution of fighters who surrender or are hors de combat is a war crime," HRW added.
IS swept across a third of Iraq in 2014 and seized several cities including Mosul, before starting to be driven out in mid-2017.