The liberation of the northern Iraqi city of Mosul "is imminent" and the days of ISIL's self-declared caliphate "are numbered", the UN envoy for Iraq says.

But Jan Kubis told the UN Security Council on Monday that despite progress, fighting remains "a tremendous challenge" because ISIL fighters are increasingly using civilians as human shields in "a last-gasp effort that reveals little more than the inherent inhuman barbarity of the terrorists".

Kubis paid tribute to Iraqi security forces and their coalition partners for trying to limit the impact of military operations to protect civilians, "even if that comes at the cost of prolonging a harsh, bitter campaign that continues to claim both civilian and military lives".

Iraqi forces, backed by a US-led coalition, officially launched the operation to retake Mosul, the country's second-largest city, in October.

The city's east was declared "fully liberated" in January and the fight for the west was launched the following month. It has been marked by some of the most gruelling and deadly combat in the fight against Islamic State of Iraq and the Levant to date.

The city fell to ISIL fighters during a lightning charge in June 2014 that left nearly one third of Iraq in their hands and plunged the country into its most severe crisis since the US-led invasion in 2003.

ISIL's "caliphate", declared after the June 2014 military campaign, once stretched across northern Syria through much of northern and western Iraq. But the group, also known as ISIS and Daesh, is now under attack in both countries and the territory it controls has shrunk.

READ MORE: Iraq - Dozens killed in wave of suicide car bomb attacks

Prime Minister Haider al-Abadi has announced the next steps are to secure the Iraq-Syria border and to liberate west of Ninewa and Anbar governorates, the UN envoy said.

"Although large-scale military operations against ISIL will hopefully conclude by the end of this year, the security environment will remain volatile and will be characterised by continued cowardly terrorist attacks by Daesh, targeting civilians in many parts of the country," Kubis said.

"Whenever given the opportunity, Daesh, al-Qaeda and other terrorist groups will likely seek to tap into and deepen sectarian, tribal or ethnic divides, including by cooperating with criminal gangs," he added.

To deal with these challenges, he said a long-term, comprehensive reform of the security sector "is imperative".

Kubis expressed continuing concern at the delay in returning displaced residents to areas liberated long ago and at many hundreds of alleged disappearances that remain unresolved, saying these and other issues can undermine efforts towards national reconciliation and a political settlement in Iraq.