OTTAWA -- Canadian-trained Kurdish forces in Iraq are expected to watch the upcoming fight for the city of Mosul from the sidelines, underlying the ethnic and religious divisions that persist within the country.

Preparations to liberate Mosul from the Islamic State of Iraq and the Levant have been underway for months, with the Kurdish peshmerga, Iraqi military and Shia militia groups closing on the city. A humanitarian response is also being prepared to help the city's 1 million people once the fighting starts.

Victory in Mosul will mark a key moment in the fight against ISIL, as the city is the last major urban centre still controlled by the militant group in Iraq.

But Brig.-Gen. David Anderson, who is in charge of an international team of military advisers posted within Iraq's ministry of defence, indicated the approximately 2,000 peshmerga that Canada has trained in Iraq since September 2014 will not be directly involved in rooting ISIL from the city.

"The role of peshmerga, as I understand it, will be to in essence secure the northern flank of Mosul, and to some degree the eastern flank, to allow the Iraqi security forces to move forward and clear through Mosul," Anderson told reporters in a call from Baghdad on Wednesday.

International leaders have previously warned about the need to control which groups are involved in clearing Mosul. The focus has largely been on the Shia militia groups, which are accused of indiscriminately killing Sunni Muslims in areas freed from ISIL's grip. The groups say those killed were ISIL sympathizers.

But the Kurds, who have a semi-autonomous government in northern Iraq, have made no secret of their hopes for full independence after ISIL is defeated. They have also clashed several times with the Shia groups, and warned they will not return territory liberated by the peshmerga but claimed by Baghdad.

Officials warned Prime Minister Justin Trudeau last year that the Kurds could use the military training and equipment Canada is providing to fight ISIL to one day push for an independent state.

Anderson would not say when the fight for Mosul will begin. But he said the Iraqi government and international allies are already looking past the looming battle toward the "difficult part" that comes after, namely how to reconcile the various armed groups in the country.

"The long-term vision is actually probably the most important question to be answered," he said. "(ISIL) is going to be defeated. There is no doubt about that, and Mosul and Raqqa are going to fall. There is no doubt about that. The important piece is what happens afterward."

Part of Anderson's responsibility within Iraq's defence ministry is to monitor efforts to train Iraqi forces in the fight against ISIL. He said Canada and its allies have trained more than 13,500 Iraqi forces, including 6,000 peshmerga and 4,000 members of the Iraqi military.

Allegations of corruption have long plagued the defence ministry, with some saying the problem contributed to the Iraqi military's inability to stop ISIL two years ago. Just this month, Defence Minister Khaled Obeidi accused several Iraqi MPs of using their positions to lobby for defence companies.

Anderson said about $1.6 billion has been spent arming and equipping Iraqi forces through a special fund since 2015. However, he said he had seen no evidence of corruption within the ministry, and that requests for money from the fund go through a stringent vetting process.