OTTAWA -- Two Canadian military teams are in Lebanon and Jordan as the international community searches for ways to keep the Islamic State of Iraq and the Levant from spreading once the city of Mosul falls.

Senior military commanders have warned victory in Iraq's second-largest city will not mark the end of ISIL as a threat, but that it will instead go underground and resort to suicide attacks and similar tactics.

There are also growing fears that defeat in Iraq and Syria will see the group attempt to spread into the surrounding region, where it will try to cause new havoc and instability.

British Defence Secretary Michael Fallon said Thursday that preventing that spread will be a key focus for those countries involved in the fight against ISIL -- also known as ISIS and Daesh -- in the coming months.

"We need momentum across the Middle East to defeat Daesh wherever it now disperses to," Fallon said at the start of an anti-ISIL meeting in London.

"As they are pushed out of Iraq, they will disperse and move to different theatres and redefine their success not by territory, but by insurgency."

Speaking by phone after the meeting, Defence Minister Harjit Sajjan said Canadian troops will remain in Iraq for the foreseeable future to ensure local forces can maintain peace and security.

Military officials have previously said Iraqi and Kurdish forces will need to be retrained to deal with the type of terror tactics that ISIL is expected to adopt after Mosul.

"We want to make sure that we solidify the gains that have been made and not leave immediately and put the situation in jeopardy again," Sajjan said.

"We want to make sure we have the right troops and the right training."

At the same time, the minister said Canada is looking at how it can help prevent any "spillage" of ISIL from Iraq and Syria into the surrounding region.

Two teams of military advisers are in Jordan and Lebanon, where they have been working with local authorities to identify gaps and ways to prevent ISIL from spreading into their countries.

To that end, the government committed last week to provide the Lebanese military with mountain-climbing and winter gear, and $1 million toward the creation of a special border patrol regiment.

Details are also being worked out around Canadian military support for a rapid-reaction force in Jordan.

"We've committed to regional stability," Sajjan said.

"Our troops are doing the analysis of where we can have the best impact ΓǪ to make sure that there's no spillage of some of these problems into the other countries."

Meanwhile, Sajjan said his biggest regret over the past year was the slow pace of improvement in terms of delivering mental-health services and pensions to military personnel.

The Liberal government will release a new defence policy early next year, which Sajjan said will go a long way to addressing many of the problems.