BAGHDAD -- More than a decade ago, Ismail Saleh says, a neighbor wanted to marry one of Saleh's cousins. Following the custom of their clan in northern Iraq, she was meant to wed Saleh, so the family refused. And thus, he says, a feud was born.

Saleh now sits on death row in Baghdad, sentenced to hang after being accused of fighting for the Islamic State of Iraq and Syria (ISIS), a charge he steadfastly denies. The chief evidence against him: the word of that neighbor.

"Sometimes I wake up and for a moment I feel that this death sentence and me being here is just a bad dream," the 29-year-old told The Associated Press in an interview in a Baghdad prison.

Get Breaking News Delivered to Your Inbox

Death sentences are being issued at a dizzying rate in Iraq's rush to prosecute and punish suspected members of ISIS, with more than 3,000 handed out over just the past few years. About 250 people condemned for alleged ISIS ties have been hanged since 2014, including 101 only last year.

Any allegation of having taken up arms for the militant group can bring the ultimate penalty, even while the evidence is thin and cursory.

The heavy reliance on informants is particularly glaring, given the potential that some are motivated by personal grudges. Informants never appear in court; their claims are passed to the judges in dry, written reports from intelligence officials with no hint of their possible motivation.

Thousands of defendants are pushed through the courts at a rapid clip, with individual trials as short as 10 or 15 minutes and a third of the cases ending in the death penalty. Witnesses are very rarely called and no forensic evidence presented, raising the likelihood of innocent people going to the gallows.

The cases are so flimsy that President Fuad Masum has refrained from ratifying many executions, which is required by law before they can be carried out, a senior official in the president's office told the AP.

"We have doubts," said the official, who spoke on condition of anonymity because he was not authorized to discuss the issue.

"We didn't find solid proof in some of the cases we've studied," he said. "We attended some hearings and found the cases are ruled on quickly in one hearing."

Still, the pressure is rising for executions to be carried out even more rapidly, including from Prime Minister Haider al-Abadi. Last month, 13 people accused of ISIS ties were hanged within three hours of the president ratifying the death documents - an unusually quick turnaround.

The AP spoke to Ismail Saleh and two other Iraqis accused of being Islamic State group fighters who were sentenced to death, as well as to their families in and around the northern city of Mosul.

Like nearly all the other defendants, all three denied ties to ISIS. Not all the details of their accounts could be independently confirmed, but their stories - which raise reasonable doubts over their guilt - were not closely examined in court before they were condemned to die, underscoring the system's weakness.

That judicial haste was readily apparent when the AP attended three consecutive days of court sessions in Baghdad in late May.

The court heard an average of a dozen cases a day, most involving accused ISIS members. During those three days, the presiding judge, Suhail Abdullah Sahar, imposed at least 10 death sentences.

"We do everything we can to get to the truth and we don't want to be unfair to anyone," Sahar told the AP. "These defendants are here on the strength of testimony given by a secret informer, neighbors or their own families."

The judge acknowledged he knew some informers offered incriminating testimony to settle old scores, but gave no indication how he could differentiate true testimony from false.

Saleh told the AP that the feud with the family of his neighbor festered for years after the dispute over his cousin - even though Saleh ultimately didn't marry her either.

In May 2017, shortly after his neighborhood was freed from ISIS militants, security forces arrested Saleh and sent him to a local prison, where he said he was tortured and beaten for four days. The neighbor, he was told, had turned him in, telling authorities he had been temporarily detained by ISIS because Saleh told the militants the neighbor had been a member of the police force.

During his brief trial in December, Saleh said the judge asked if he had informed on his neighbor.

"I said no," Saleh recounted. "Then he asked me to leave during consultations. When I came back, I was sentenced to death."

His crimes, according to a copy of the verdict obtained by the AP, were joining ISIS, fighting against security forces and informing on the neighbor. The ruling said it was based on the neighbor's testimony and a confession by Saleh. Saleh says he indeed confessed - but only to stop the torture.

In Mosul, his family said Saleh had his own troubles with ISIS during its rule. Like his neighbor, he was detained when the militants learned he had applied for a policeman's job in 2007, according to his mother, sister and wife.

After ISIS was driven out of Mosul, government-linked Shiite militiamen detained Saleh twice on suspicion of belonging to ISIS, each time holding him overnight, said his wife, Hind Zaki.

Zaki said she was two months pregnant with their sixth child when the army arrested Saleh for the final time. For the next three days, she said she received calls from his mobile phone and could hear him screaming in the background, as the caller told her that her husband had confessed to being an ISIS member and that she, too, was a member.

When she was five months pregnant, she said, an army officer and three soldiers kicked in the door of her home. The officer beat her, stuck a pistol in her mouth and threatened to rape her, Zaki said.

"At one point, I was barely conscious," she said. "The soldiers kept telling him, 'Let's go before she dies.'"

She finally saw her husband again after he was convicted, visiting him in prison with three of their children.

"I don't even know if any of my children know that I have been sentenced to death," Saleh said.

Quteiba Younis was 16 in 2014 when ISIS overran northern Iraq, including his home village of Areij. A typical teenager, he was into PlayStation and was just starting to get interested in cars. He swam in the Tigris River every day to escape the summer heat.

Shortly after the militants' takeover, his father lost his job at a government fuel depot, so the teen - the eldest of 10 siblings - had a duty to support the family. He eventually found work as a guard at a cement factory taken over by ISIS, a job that required carrying a rifle.

That appears to have sealed his fate: an informant told security agencies that Younis was an armed fighter with ISIS.

"My life has been lost," Younis, now 20, told the AP in a prison interview.

Younis had been detained and flogged by ISIS militants for selling cigarettes on the black market to make ends meet, according to his mother, Nada Hassan.

The family fled Areij as Iraqi forces battled to retake the territory in 2017, settling into a camp for the displaced, where federal police arrested Younis in February. Younis said he was beaten, tortured with electric shocks and hung upside down, finally confessing to crimes he hadn't committed to end his torment.

Based on the confession and informant testimony, a judge convicted him and sentenced him to death on May 10.

The informant was a distant relative who often gave names to security agents, said Younis' father, Saad. Saad Younis said he has never confronted the man for what he insisted are lies about his son, but vowed that he will one day.

"I have resigned myself to God's mercy," the father said. "But when this is all over, I will face him and ask him why he did that."

The third condemned man interviewed by the AP, Ahmed Nijm, unabashedly said the Islamic State group had the right idea. They came to Mosul, he said, "in an earnest, sincere search for justice."

Nijm said the militants were initially loved by the people for ending the chaos and lawlessness that flourished in the years after the 2003 U.S.-led invasion of Iraq.

But despite his admiration for the strict beliefs of ISIS, he insisted he was never a member of the group.

Nijm was arrested in May 2017 during the battle for Mosul as he tried to cross into a district still held by the militants. Iraqi security forces were on the lookout for ISIS members attempting to blend in with the throngs fleeing for safety. His family said Nijm was arrested only because his long beard marked him as Salafi, a Muslim movement that, similarly to ISIS, advocates an austere interpretation of the faith.

"They didn't check his name on the computer," said his mother, Hamdah, referring to the databases that officials use to track ISIS suspects.

A witness identified Nijm as an ISIS fighter, according to an investigator familiar with the case who spoke to the AP on condition of anonymity because he was not authorized to talk.

Nijm said he was beaten and threatened with electrical shocks during his interrogation.

"My body is too weak for torture. So I confessed to having joined Daesh for a month," he said, using the Arabic acronym for ISIS.

Nijm, who was sentenced to death on April 19, insisted to the AP that he is not afraid.

"I hope death comes to me when I am on my prayer rug," he said. "If I have been oppressed, then God will bring me justice. At the end I would rather die as the oppressed, not the oppressor."

All three men interviewed by the AP did not retain lawyers - common with most defendants, either because they cannot afford them or because they have little or no contact with their families between their arrests and court appearances.

Judges duly appoint an attorney, selecting from one of the two normally present in the court. They are paid the equivalent of about $30 per case by the government.

With each case, the lawyer repeats the same defense - the defendant confessed under torture - and moves for an immediate release, a motion almost certain never to be granted.

Court-appointed defense attorney Riyadh Saleh said he is not allowed to request postponements or time to study case files. Still, he said, "it's understandable when you think that Iraq is going through a very delicate phase."

Judges base their verdicts on documents compiled by intelligence agencies and investigators, who rarely collect physical evidence and instead almost always focus on obtaining confessions and informant testimony.

Human rights groups have repeatedly said Iraqi security forces systematically use torture and abuse. But Sahar, the judge, said he didn't believe most claims.

"Ninety percent of those who claim to have been tortured say that to escape punishment," he said.

In the cases the AP witnessed, Sahar often appeared to pay little attention when defendants spoke and was dismissive of their comments. One defendant, hoping for leniency, said his shoulder wound was caused by mortar shelling of his home. "No, it was caused during your work at a Daesh ammunition factory," Sahar shot back.

All but one of the trials attended by the AP ended in a guilty verdict.

Despite the harsh sentences, most defendants remained stony- faced as they were shuffled out after their brief time in the stand. But one man erupted as the judge read out the names of witnesses who accused him of joining ISIS, issuing religious rulings for the group and delivering a car bomb used in an attack.

"Heaven and Earth as my witness, I don't know these people!" Ahmed Habib cried out. Habib said he had been beaten by Kurdish troops who arrested him. "Your honor, where is the accountability? Why the torture? This is a democratic country, so why I am I not allowed to speak freely?"

He was sentenced to death.