KABUL (Reuters) - A combined force of Taliban and “self-proclaimed” Islamic State militants killed at least 36 people in what may amount to war crimes during a raid on a northern Afghan town this month, the United Nations said on Sunday.

Graves are prepared for the burial of civilians, who were killed by insurgents at Mirza Olang village, in Sar-e Pul province, Afghanistan August 16, 2017. REUTERS/Stringer

The dead in the town of Mirza Olang included civilians and pro-government fighters who had been disarmed before they were shot, a preliminary U.N. report concluded.

The killings occurred during fighting between Aug. 3 and 5 after the militants attacked the town, which lies in Sar-e Pul province. At the time Afghan officials put the death toll at 62, with at least 36 bodies recovered from mass graves last week.

A spokesman for the Taliban called the U.N. report “baseless allegations” and “false claims”.

Zabihullah Mujahid repeated an earlier statement that the Taliban had killed 28 pro-government militia fighters, but no civilians were harmed. He also denied that Islamic State was involved in the fighting.

Islamic State issued a statement last week saying it had led the attack and killed about 54 Shi’ite Muslims.

While U.N. investigators noted in the report that a commander implicated in the raid has claimed allegiance to Islamic State, they said they were “not aware of any information supporting his links” to the group.

They said they had confirmed that as many as 27 civilians were killed, including one woman, four boys under the age of 17, and 13 men over the age of 60. “These killings, corroborated by multiple credible sources, constitute violations of international humanitarian law and may amount to war crimes,” the report concluded.

Also among the dead were at least seven pro-government militia fighters, one local policeman, and an Afghan army soldier.

Many of the casualties occurred early on Aug. 5, after the last government checkpoints in the town had fallen and residents and security forces alike were trying to escape, the report said.

At one point, militants captured a group of people trying to flee. After separating the men from the women and children, the militants took the men - who included the civilians and disarmed security forces - to another location and shot at least 18 dead, according to witnesses interviewed by the U.N..

The report said it was unable to verify reports of sexual violence, and did not find evidence to support claims that many of the victims were beheaded.