OTTAWA -- Canadian special forces have left the city of Mosul and are now backing up Iraqi forces as they prepare to assault one of the Islamic State group's last strongholds in the country.

The move comes amid growing friction between the various local groups facing off against the Islamic State of Iraq and the Levant, and warnings that despite its battlefield victories, the international community has a lot more work to do in Iraq.

The Iraqi military, Kurdish peshmerga and various paramilitary groups have surrounded Hawija, a city of about 150,000 people, and are waiting for Prime Minister Haider al-Abadi's order to attack.

Victory there would represent a pivotal moment in the war against ISIL, since the group would then control only a few small pockets of Iraqi territory along Syria's border.

Canadian troops who had been helping Iraqi forces secure Mosul throughout the summer are now near Hawija, and will provide support during the upcoming battle, military spokesman Maj. Alexandre Cadieux said Friday.

Canada has about 200 special forces soldiers supporting local forces in northern Iraq. Most of their work has been with the Kurds, but Cadieux said they are also now operating with other Iraqi groups.

"Members of the Special Operations Task Force will provide their (Iraqi Security Force) partners with advice and assistance in the vicinity of Hawija," Cadieux said in an email.

"Canadian Armed Forces personnel are advising its partners on how to best secure their position and prevent effective counter-attacks from Daesh," he added, using the Arabic name for ISIL.

"CAF personnel also advise and assist in the detection, identification and possible prosecution of Daesh targets by our partner, or through coalition resources."

Exactly when the battle will start has been a source of speculation for several weeks.

Hawija is located in territory claimed by both the Kurds, who have their own semi-independent regional government, as well as Iraq's central government in Baghdad.

That alone has created disagreements between the various forces preparing to attack the city, but the fact the Kurds plan to hold a referendum on independence on Sept. 25 has heightened tensions.

Yet even if Hawija is liberated, one senior Canadian officer whose job is to organize coalition training efforts and help Iraqi officials plan operations says the hard work is just beginning.

Brig.-Gen. Steven Whalen said that's because Iraqi security forces will continue to need help as ISIL shifts to terrorist tactics such as suicide bombings, one of which killed 80 people on Friday.

"This fight is not anywhere near over," Whalen said in an interview from Baghdad, where he is leading a team of international advisers inside Iraq's defence ministry.

"From a military perspective, we are expecting that there is going to be some kind of insurgency-type scenario that will evolve. And we see some signs of it occurring elsewhere in Iraq."

Special units are being trained to deal specifically with such a threat, Whelan said, but there is also the need to make sure regular forces are able to hold territory and conduct basic military tasks.

"We're going to transition from building hardcore combat capability to moving towards giving the Iraqis training and resources to help them become self-sustaining," Whelan said.

"They're not ready for self-sustainment yet from a security perspective."

The Liberal government recently extended Canada's mission against ISIL until March 2019, while giving the military more flexibility to decide on its own what it needs to accomplish its objectives.

One area that Canada is exploring is whether to partner with NATO to train Iraqi forces to find and disarm improvised explosive devices, though military officials said no decisions have been made.

In addition to the special forces troops, Canada has surveillance, refuelling and transport planes, an intelligence unit, a helicopter detachment and a military hospital in the region to help fight ISIL.