OTTAWA -- Federal opposition parties are divided over whether Canada should press ahead with its five-year-old mission in Iraq or start bringing home its soldiers, some of whom were forced to take cover last week from Iranian ballistic missiles as tensions in the region escalated.

The Conservatives have indicated they support Canada's ongoing involvement in Iraq and the fight against the Islamic State of Iraq and the Levant, saying the group continues to pose a threat to the West despite having lost much of its territory and strength over the past five years.

"The work's not done and we need to make sure that we rid the region of (ISIL) permanently," Conservative defence critic James Bezan said. "If we pull out early, the same thing could happen in Iraq as last time, in that it becomes a safe haven for (ISIL) and other terrorist organizations."

The Liberal government says it plans to resume the entire mission once the security situation improves.

The New Democrats say they support Canada's efforts to train Iraqi forces through the NATO military alliance, but they want the Liberal government to withdraw the estimated 200 special-forces soldiers who have been working in Iraq as part of the U.S.-led anti-ISIL coalition since 2014.

The secrecy that has surrounded the special-forces mission is one of the reasons for the demand, said NDP foreign affairs critic Jack Harris, noting long-standing questions about what the troops are actually doing, including whether they are -- or have been -- involved in combat remain unanswered.

"But also the situation in terms of what we're dealing with here. If you look at (U.S. President Donald) Trump's moves in Iran in the last 10 days, we now have a very unpredictable partner in Mr. Trump and the Americans ... and we think that's a dangerous place for Canadians to be."

The divergent views follow not only an extremely explosive and unpredictable week, which saw the U.S. and Iran come to the brink of war, but also mixed assessments in recent months of the progress in training the Iraqi military and eradicating ISIL.

The Pentagon's top watchdog painted a gloomy picture in November about the five-year-old fight against ISIL, warning the U.S. withdrawal from Syria and subsequent Turkish offensive had let the organization regroup and strengthened its ability to plan attacks against the West.

Yet the report by the U.S. Defense Department's Office of the Inspector General also warned that Iraqi security forces continue to rely heavily on American and other allies when taking the fight to ISIL, raising questions about the effectiveness of military-training efforts.

Canada's mission in Iraq has two main elements, the first of which involves about 200 troops who have been training local forces through NATO since October 2018 to fight ISIL. Canada is leading that mission, which is based largely in the south of the country around the capital Baghdad.

A similar number of Canadian special-forces soldiers have been working in Iraq as part of the U.S.-led anti-ISIL coalition since 2014. Officials have said their most recent focus has been on helping Iraqi counter-terror units root out any remaining ISIL cells in the north.

Both elements saw their missions suspended last week, with orders for the troops to hunker down on military bases or, in some cases, relocated to Kuwait, over fears Iran or its proxies would retaliate for the U.S. having killed Iranian Maj.-Gen. Qassem Soleimani.

Those fears proved to be founded as Iran launched ballistic missile attacks against two military bases in Iraq last Tuesday, including one outside the northern city of Irbil where Canadian special forces have been operating for the past five years.

No one was injured in the attacks, but the Iranian military later shot down a commercial airliner that same night that was carrying 176 people, including 57 Canadians and dozens of others who were flying to Canada. Iran has apologized and an investigation is underway.

While the threat of conflict appeared to have lessened as Iran and the West dealt with that tragedy, Canadian troops remained on lock down Monday, one day after rockets hit an Iraqi base north of Baghdad. It wasn't clear who fired the rockets, which are different from Iran's missiles.

Complicating matters is a resolution that was passed by the Iraqi parliament last week calling for all foreign troops to leave the country. Many Iraqi parliamentarians boycotted the vote, but outgoing Prime Minister Adil Abdul-Mahdi has voiced his support for it.

Canadian Defence Minister Harjit Sajjan was scheduled to travel to Brussels on Tuesday to meet with NATO Secretary General Jens Stoltenberg and Sajjan's Danish counterpart, whose country is taking over the NATO training mission in Iraq later this year.

This report by The Canadian Press was first published Jan. 13, 2020.