A member of Iraqi federal police patrols in the destroyed Old City of Mosul, Iraq August 7, 2017. REUTERS/Suhaib Salem

BAGHDAD (Reuters) - Iraqi Prime Minister Haider al-Abadi’s office said on Thursday a unit of the security forces committed “abuses” against civilians during the offensive to oust Islamic State (IS) insurgents from the city of Mosul.

His government began an investigation in May into a report by German newsmagazine Der Spiegel that included images of apparent torture taken by a freelance photographer embedded with the Interior Ministry’s elite Emergency Response Division (ERD).

“The committee has concluded ... that clear abuses and violations were committed by members of the ERD,” a statement from Abadi’s office said. It added that the perpetrators would be prosecuted.

Spiegel’s photos showed detainees accused of affiliation with Islamic State hanging from a ceiling with their arms bent behind them, and the journalist wrote of prisoners being tortured to death, raped and stabbed with knives.

The ERD was one of several government security forces backed by a U.S.-led coalition that drove IS out of Mosul, the northern city the jihadists seized in 2014 and proclaimed their “capital”, in a nine-month campaign that ended in July.

The ERD initially denied the Spiegel report and accused the German weekly of publishing “fabricated and unreal images”.

The photographer said he had initially intended to document the heroism of Iraqi forces fighting Islamic State but that a darker side of the war had gradually been revealed to him.

The soldiers with whom he was embedded allowed him to witness and photograph the alleged torture scenes, he said. He has now fled Iraq with his family, fearing for his safety

Islamic State’s self-proclaimed “caliphate” effectively collapsed with the fall of Mosul but parts of Iraq and Syria remain however under its control, especially in border areas.