MANILA, Philippines — Amnesty International said Friday it has documented violations of humanitarian law, some amounting to war crimes, during the five-month conflict between Philippine government troops and Islamic State-allied militants who laid siege to the southern city of Marawi.

The human rights group said the militants committed unlawful killings, hostage-taking, pillage and mistreatment of prisoners. They allegedly used child soldiers and murdered civilians, which is a war crime, with some of their targets said to have been singled out because they were Christian.

Government forces allegedly tortured and mistreated detainees and looted, Amnesty said in its new report.

The siege of Marawi raged from May 23 until the government declared it over on Oct. 23. More than 1,100 combatants and civilians were killed, including more than 900 Filipino and foreign militants, and about half a million people were displaced by the prolonged and widespread fighting.

The military’s bombing of militant-held areas of the city wiped out entire neighborhoods and killed civilians, highlighting the need for an investigation into compliance with humanitarian law, Amnesty’s report said.

Maj. Gen. Restituto Padilla, the armed forces spokesman, said the military is committed to respecting humanitarian law and human rights and the government will answer the allegations in Amnesty’s report after it gets a copy of the report. He said the military chief of staff has told troops he will not tolerate misdeeds.

Padilla said the military had many challenges in the main battle area during the Marawi conflict and rescued 1,780 civilians. A primordial consideration in the use of force was the safety of civilians, he added.

AI said Philippine authorities seem to be responding to concerns about looting by security forces, with investigations and charges under way. They must also provide compensation, it added.

U.S. Ambassador Sung Kim said last month there were no credible reports or allegations that the armed forces engaged in any abuse or rights violations against the people of Marawi. “It’s quite positive that the Philippines military behaved in a responsible manner in a very difficult situation,” he added.

For its report, Amnesty International said it interviewed 48 survivors and witnesses, and many described how the militants regularly targeted and killed civilians.

Multiple witnesses described 10 incidents in which militants killed at least 25 civilians by shooting them or slitting their throats. Most were targeted because they were Christians, and some were killed as they attempted to flee, it said.

Militants took numerous civilian hostages, majority of them Christians who were physically abused, made to do forced labor, used as sex slaves or human shields and forced to make bombs and fight the military, the report said.

The report cited instances in which members of the Philippine military treated civilians who escaped militant-controlled areas with suspicion, detaining them and subjecting them to torture or ill-treatment.

Eight victims of alleged abuse by members of the military were interviewed for the report, including seven Christian construction workers who had been trapped in Marawi because they feared being captured or killed by militants if they tried to escape.

The report quoted one of the workers as saying that after he and his companions crossed a bridge to flee a militant-controlled area, Philippine marines detained and beat them up, insisting they were militants. He said he was punched and kicked, beaten with a rifle, and their hands and feet were tied with electrical wire.

Amnesty International urged the government to investigate and ensure reparations for victims. It also called for quick rebuilding efforts, the safe return of residents, the restoration of habeas corpus and consideration of lifting martial law still in force in the south.

“The Philippine authorities must bring those responsible for torture and other violations to justice and ensure that the victims receive adequate reparations,” said Tirana Hassan, the crisis response director at Amnesty International. “They must also initiate a prompt, effective and impartial investigation into whether its bombing of civilian neighborhoods was proportional under international humanitarian law.”