Amid genocidal slaughter carried out by the Islamic State and extra-judicial killings perpetrated by Shia death squads, the United Nations says the Iraqi government is also torturing its citizens and unjustly sending hundreds of people to the gallows.

According to a report released on Sunday, in more than half of the capital trials in Iraq monitored by UN investigators, judges "systematically ignored claims by defendants that they were subjected to torture to induce confessions."

The investigators say the use of torture to extract confessions reflects an overwhelmed system that has no capacity to properly investigate crimes. The Iraqi government is also accused of using anti-terrorism laws to expedite the deaths of dissidents and suspected terrorists alike.

"The use of the death penalty in such circumstances carries the risk of grievous and irreversible miscarriages of justice since innocent people may face execution for crimes they did not commit," the UN investigators wrote.

Since capital punishment was reinstated in 2004, the government in Baghdad has put to death more than 675 prisoners. Only 11 people were executed in 2005, but the number of death penalty cases has been steadily increasing ever since, climbing even higher after the withdrawal of US forces in 2011. Last year, the courts hanged 177 Iraqis citizens. Only China and Iran executed more of their citizens than Iraq in 2013.

Through August, the government had officially hanged some 60 people, and another 1,724 detainees currently sit on death row in Iraqi jails. The US, with roughly nine times the population of Iraq, has just over 3000 death row inmates.

Women constitute a small number of the people executed or awaiting their fate on death row. "Many female detainees alleged that they had been detained in lieu of male family members," investigators wrote.

The UN also cited two cases where evidence suggested that prisoners were under 18 at the time of their alleged crimes, but they were still sentenced to death after "an ordinary medical doctor" testified that they were older.

"Police are poorly trained and equipped," Francesco Motta, head of the UN's human rights office in Iraq, told VICE News. "In the current environment police arrest a person, and, because they have to have evidence in order to charge and try the individual… they inevitably resort to forcing a confession from the accused — which in turn is often the only, or a significant part of the prosecution's case."

The UN's high commissioner for human rights, Zeid Ra'ad Al Hussein, and its special representative for Iraq, Nickolay Mladenov, called on the Iraqi government to implement a moratorium on the death penalty following the publication of the report.

"Given the weaknesses of the criminal justice system in Iraq, executing individuals whose guilt may be questionable merely compounds the sense of injustice and alienation among certain sectors of the population, which in turn serves as one of the contributing factors that is exploited by extremists to fuel the violence," Zeid said.

In 2005, the Iraqi parliament passed a stringent anti-terrorism law. Sunni leaders have long seen the bill as disproportionately affecting their communities and opponents of Prime Minister Nouri al-Maliki. Under the law, "anyone who committed, as a main perpetrator or a participant, a terrorist act, along with anyone who incites, plans, finances or assists terrorists to commit such a crime" is sentenced to death.

Iraq's former president Jalal Talibani opposed capital punishment, so mass hangings were previously carried out when the Kurdish politician was outside the country. On one occasion in 2013, 34 prisoners were put to death on the same day.

Under current Iraqi law, there is no guaranteed right to silence or an attorney. Defendants charged under the 2005 anti-terrorism law can be held indefinitely without facing charges or a trial.

When suspects do appear before a judge, UN observers found they usually do so without a lawyer. In the rare cases where the court does assign an attorney to represent the accused, "rarely is any time given to the defendant to prepare his or her defense, and the only intervention on the part of the lawyer is most likely — if at all — during sentencing, when a perfunctory plea for clemency or leniency is made," Motta said.

Nearly 95 percent of the prisoners and detainees who Motta's staff spoke with alleged that they suffered some sort of abuse or torture in order to extract confessions.

"The system is at its weakest when you are practicing dragnet detention policies," Michael Wahid Hanna, senior fellow at The Century Foundation and former researcher for Human Rights Watch in Baghdad, told VICE News. "That only gets worse in times of crisis and it means that a lot of otherwise innocent people get caught up."

During the American occupation, Iraqi courts sometimes saw coalition soldiers provide testimony in terrorism cases. "We had this strange hybrid, at times we did have the introduction of forensic evidence," Hanna said.

But the judicial system, like Iraq's security forces, was subject to American efforts to clean traces of Saddam Hussein's regime. The process left the public impression that the judicial branch was dominated by elements close to the government.

"It's been a broken system for a long time," Hanna said. "That has only gotten worse as the sectarian violence has increased."

The UN and legal experts point out that the death penalty itself isn't illegal under international treaties. Torture, however, is banned — and the right to a fair trial ensured — under the Universal Declaration of Human Rights.

"In our view, in order to address the root causes of terrorism and insurgency, the government must as urgently be seen to provide real justice to the people of Iraq, by undertaking reform of the criminal justice system to ensure due process and fair trial standards," Motta said.