Islamic State group militants systematically executed at least 600 Iraqi prisoners in a single massacre this summer in Mosul, according to a report from Human Rights Watch released Thursday. Survivors and witnesses gave disturbing accounts of the massacre at the Badoush prison, and an HRW investigation found the extremist group’s actions to “amount to war crimes and most likely crimes against humanity.” The majority of the executed men were Shiite Muslims. The Islamic State group, also known as ISIS, is Sunni.

“The gruesome details of ISIS’ mass murder of prison inmates make it impossible to deny the depravity of this extremist group,” senior terrorism and counterterrorism researcher Letta Tayler told HRW.

When militants from the group captured Iraq’s second-biggest city, Mosul, in June, the Badoush prison housed nearly 3,000 inmates. The day before the mass execution, the prison had no food and prison guards were in a panic, one survivor told HRW. Guards reportedly changed into civilian clothing and fled that night.

“They told us, ‘Mosul has fallen to ISIS. Escape if you can.’ But the cell door was locked. It was chaos inside,” said a Yezidi survivor whom HRW called R.K.

ISIS managed to break into the prison with help from inmates who had already pledged allegiance to the group's self-declared caliphate.

Survivors said around 1,500 inmates were then moved to a deserted area some 2 km away from the building. The prisoners were separated by religion and then militants drove the Sunnis and Christians to a different area. Militants then robbed the remaining Shiites and ordered them to kneel along the edge of a ravine, raise a hand, and count off.

“I was number 43. I heard them say ‘615’ and then one ISIS guy said, ‘We’re going to eat well tonight.’ A man behind us asked, ‘Are you ready?'” said one survivor whom HRW called A.S.

Militants then began firing machine guns, shooting prisoners from behind and only stopping when they had run out of ammunition. Before they left, ISIS militants set fire to the massacre site.

A.S. told HRW he felt a bullet hit his head and his arm before falling unconscious.

“Before they started shooting, I managed to kiss the men on each side of me, because we knew we were going to die,” A.S. said. “After we said goodbye to each other, I took my daughter’s picture and kissed it, and I prayed to God to save me for her.”

The following day, ISIS executed between 560 and 770 men about 200 km (120 mi) from the prison, in Tikrit. The militant group posted videos and photos of the execution to social media accounts and claimed to have executed 1,700 Shiite Iraqi soldiers that day.