A captured ISIS battle flag hangs in a glass case on the wall outside the Ottawa office of the commander of Canada's special forces.

A hard-earned prize from a misunderstood war.

Losing "the colours" is a humiliation for any military unit, a sign the battle, and maybe even the war, has been lost.

The black flag, with white Arabic letters declaring, "There is no God but Allah," is also a startling, visceral reminder of how much of the three-year conflict in northern Iraq has played out away from the public spotlight.

It also raises the question of whether Canada's involvement has run its course.

Canadian special forces look over a Peshmerga observation post in northern Iraq last February. (Ryan Remiorz/Canadian Press)

The Trudeau government committed last June to keep troops in the war-torn country until 2019, but it has never been clear about what those troops would do there once ISIS was expelled.

Just before Christmas, Defence Minister Harjit Sajjan signalled the mission would get another makeover, but was vague on what it would look like.

The question military commanders are grappling with is whether this next phase of the war will fall within the strict political lines laid down by two successive governments.

Special forces troops were mandated to "advise and assist" but not take part in offensive combat alongside the Iraqi army and Kurdish Peshmerga forces. The expulsion of ISIS, also known as Daesh, which fought large conventional battles to hold on to the territory it seized in 2014, did require Canadians to shoot to protect themselves and their allies.

Mission accomplished?

Last fall, Iraqi Prime Minister Haider al-Abadi effectively declared his country's war with ISIS over.

But while ISIS may have been defeated as a military force, it is far from dead, said Maj.-Gen. Mike Rouleau. The commander of Canada's special forces has drafted recommendations for the next steps as they pertain to his troops.

"The threat is going to morph," Rouleau told CBC News in a recent interview.

"What is Daesh going to do next? If they are not landowners with an overt military presence and heavy weapons in the hinterland, we believe they are probably going to go underground."

Going underground would mean the Iraqis and Kurds would have to be taught to fight a counter-insurgency and counterterrorism war, or at the very least, supported in their own elite forces operations.

It is a much more delicate, precise kind of warfare.

"It's much more intelligence-driven," Rouleau said.

"So, it's a slightly different skill set. It's too early for me to tell you whether [the new mission] is going to have a training component to it — or just an advise, assist component. But these are all the things we are looking at."

Combat vs. non-combat

The political debate about whether the special forces were engaged in "combat" in Iraq has dogged the governments of both Stephen Harper and now Justin Trudeau.

The precise — sometimes hair-splitting — explanations boiled down to this: it wasn't considered combat unless Canadian troops planned an operation and took the offensive. Officials have insisted the latter never happened.

Avoiding direct combat is something the Canadian government, particularly the Liberal government, has been keen to do.

But counter-insurgency and counterterrorism is all about going on the offensive and even taking pre-emptive action against an enemy.

A resident of Tabqa, Syria, waves an ISIS flag after militants reportedly seized control of an air base near Raqqa in 2014. ISIS has since been defeated in much of Iraq and Syria. (Reuters)

Rouleau visited Iraq last month as part of his assessment.

He would not discuss the specifics of what he is recommending to the chief of the defence staff and by extension the government, but it is becoming evident the mission has reached a fork in the road.

Rouleau said it remains to be seen whether his "options are squarely within the mandate the government gave us."

"At this juncture, I believe they will be under the advise, assist and potentially accompany regime."

Reconstruction needed

Other senior defence officials, speaking on background, said there is also the possibility that the special forces could continue with traditional military training of Iraqis and Kurds.

That would be to ensure Iraqi forces hold together in the future and don't melt away in the face of an enemy, the way they did when ISIS fighters swept out of Syria in 2014 and captured vast swaths of Iraqi territory.

Canada's special forces arrived on the ground in the fall of that year and began training the Peshmerga in conventional battle skills.

But that co-operation came to a screeching halt a few months ago when fighting erupted between independence-minded Kurds and the Iraqi army, which wanted to impose the authority of the central government in Baghdad.

In this 2016 photo, a partially destroyed ISIS banner hangs at the entrance to Qayara, Iraq, where oil wells were set alight by militant fighters attempting to obstruct airstrikes as Iraqi forces took control of the area. (Susannah George/Associated Press)

Aside from training, there is also a large role for Western forces in reconstruction, particularly around recently liberated Mosul, the country's second largest city.

ISIS extremists, as they retreated, sowed many ruined buildings and streets with mines and booby traps. Some estimates last summer suggested it could take up to a decade to rid the city of explosives entirely.

United Nations officials have said Iraq will need a de-mining program similar to the one instituted in Afghanistan, which employed 15,000 people at its peak.

Canada currently has combat engineers training Iraqis in the finer points of dismantling bombs.

A helicopter detachment, two C-130J Hercules transports, intelligence officers and a Role 2 combat hospital are also stationed in Iraq.