Iraqi forces still faced pockets of resistance from Islamic State in Mosul's Old City on Friday, four days after the prime minister declared victory.

Iraqi army helicopters flew overhead and explosions could be heard, residents said, while videos of alleged revenge attacks against people detained during the retaking of Mosul underlined future security challenges.

"Three mortars landed on our district," a resident of Faysaliya, in east Mosul, just across the Tigris river, said by telephone.

A few hundred Islamic State fighters swept into Mosul three years ago and imposed a reign of terror after the Iraqi army collapsed.

Iraq's victory in Mosul marked the biggest defeat for Islamic State, which is under siege in the Syrian city of Raqqa, its operational base.

Even though the group's caliphate is crumbling, it is expected to revert to an insurgency and keep carrying out attacks in the West and Middle East.

Securing long-term peace in Iraq will not be easy.

Read more:  Reuters