The last thing that came to Saad Khalaf Ali's mind as his Islamic State interrogators smothered him with a plastic bag was his two wives and children. Then everything went dark.
He was jolted back to his senses by an electric current coursing through his body, and came round soaked in water and gasping for breath on the floor of a prison in northern Iraq.
The former policeman is one of many Iraqis to have suffered at the hands of the Islamic State group, which tortures, executes or beheads anyone deemed immoral or an opponent of its ideology and its goal of creating a caliphate across the Muslim world.
Saad withstood the punishment but succumbed to psychological pressure when the militants threatened to slaughter his entire family.
He confessed to informing Kurdish and Iraqi forces about Islamic State positions, an action frequently punishable by beheading or shooting at point blank range.
"I confessed to everything," said the 32-year old former policeman from the Hawija area.
A small man with large ears, Saad was brought blindfolded before a judge who sentenced him to death.
Saved by Kurds, US forces
It would have been carried out on the morning of October 22 if not for a daring rescue mission that same night by Kurdish and U.S. Special Forces. Saad and 68 other hostages were freed.
Reuters interviewed three of them at a security facility in the Kurdish regional capital Irbil. The men recounted their experiences of life under Islamic State rule, and the physical and psychological torment that often comes with it.
Many of the prisoners were former members of the Iraqi security forces who fought some of the same insurgents before the militants overran a third of Iraq.
Reuters could not independently verify the accounts.
One U.S. commando was killed – the first American to die in ground combat in Iraq since the United States withdrew its troops in 2011 – and four Kurds were wounded in the rescue.
The windowless room in which 31-year old Ahmed Mahmoud Mustafa was held could only just fit him and 38 others when they stretched out to sleep.
The prisoners were expected to remain silent, pray five times a day and read Islamic lessons provided by their captors.
Meals consisted of potatoes, lentils and tomato.
Occasionally, one of the men would say a verse of poetry as a lament and the others wept quietly.
Surveillance cameras in the corners of the room monitored their movements, and they were sometimes forced to watch clips of beheadings played on a large screen.
One man averted his gaze from a particularly grisly scene and was beaten on the head, according to Ahmed and Mohammed Abd Ahmed, who was also held there.
It was neither man's first brush with Islamic State's wrath.
Several months earlier, Mohammed had been whipped 50 times for criticizing the militants, and was warned they would slice off his tongue next time.
Ahmed had also been detained on four previous occasions because a person he had a personal dispute with had connections with the militants.
This time, both men faced the more serious charge of spying. Their interrogators – fellow Iraqis – had a file for each prisoner detailing crimes corroborated by two witnesses.
One of the two men who had testified against Ahmed was killed in an airstrike, winning him a brief reprieve. But the militants soon found another man prepared to testify against him: his own cousin.
Execution vs more interrogation
Once the interrogators finished their work, they gave the prisoner's file to a judge, who ordered either execution or more interrogation.
In the end, Mohammed succumbed to the torture and put his fingerprint on a list of charges as an admission of guilt, reasoning that denial would only prolong his suffering and death was inevitable anyway.
The interrogators asked whether he would prefer to be decapitated from in front or behind. "It's up to you," he replied.
In a separate room, Saad could hear the sound of heavy machinery outside and clambered onto the back of another prisoner to peer through an opening in the wall. He saw a bulldozer digging a trench.
The following day, October 21, four of the prisoners were taken from the room and a short while later, the remaining 26 heard four gunshots.
Saad was informed it would be his turn the following morning.
WATCH: Video of Kurdish, U.S. Special forces raid to free hostages
There was no paper or pencil, so he used a nail to etch his last wishes onto a Muslim prayer timetable as the hours ran out.
The message addressed to his nephew was short: It asked that he look after his family and identified the two men who had informed on him, so his death could be avenged.
Then Saad prayed for himself, weeping uncontrollably until he was interrupted at around 2 a.m. by the sound of helicopter rotors that heralded the end of his ordeal.
Following an intense firefight, the door of the room was smashed down by a Kurdish commando with an M16 rifle.
"Are any of you Kurds?" the man shouted, as Saad recalls. "We said no, we are Arabs".
One of the men explained they were prisoners of Islamic State, to which the commando replied: "Don't be afraid, we have come to liberate you with the Americans."