The Canadian government should have seen this coming, says international security expert Christian Leuprecht.

The Royal Military College professor says Canada could have planned for what to do when its own citizens — ISIS members, their wives and children — were captured or surrendered on the battlefield in Syria.

"For years, governments of both political stripes had the opportunity to anticipate that we were going to find ourselves in this position and instead ... just kind of hoped the issue would go away," said Leuprecht, who also teaches at Queen's University in Kingston, Ont.

Now, as a result of the U.S.'s planned withdrawal from Syria, there's some urgency to the question of what to do with Canadians detained in the war-torn country.

As many as 5,000 alleged ISIS fighters and their families are being held in makeshift prisons in Syria. The number is swelling daily as ISIS loses its final strongholds in eastern Syria.

CBC News has determined that as many as 32 Canadians are currently held by the U.S-backed Syrian Democratic Forces, a Kurdish-led group that's been fighting ISIS.

Some of the Canadians in custody were captured in battle, including Toronto's Mohammed Abdullah Mohammed, who was taken by the SDF in a firefight last month.

Others include two women believed to be from Ontario and Alberta, who surrendered to the SDF along with their children last week after fleeing one of the last ISIS-controlled villages in Syria.

But the U.S. says it's pulling out of Syria soon, leaving the SDF to fight on its own. The militia says it can't protect the thousands of prisoners while also protecting itself.

The U.S. has tried to soften the impact of its departure by supporting the SDF's call on other countries to repatriate their prisoners.

France is the first Western country to respond. It's believed to have moved 80 of 130 citizens back to France, all to be prosecuted for joining ISIS.

Public Security Minister Ralph Goodale says the government hasn't decided what it will do about Canadian citizens detained in Syria. (Paul Chiasson/Canadian Press)

"We've heard the request," Federal Public Safety Minister Ralph Goodale said last week, while insisting Canada won't be rushed into a decision.

"The fact of the matter remains that is a dangerous and dysfunctional part of the world, and we do not intend to endanger the lives of our consular or diplomatic officials," he said.

Gathering battlefield evidence

And if suspected militants are returned to Canada, prosecuting them for their actions overseas presents significant challenges.

It is illegal to leave or attempt to leave Canada to help a group to commit terrorism. But prosecutors will still need to prove their case.

Canada has been working with its Five Eyes intelligence partners — the U.S., Britain, New Zealand and Australia — to share available evidence.

Goodale acknowledges that obtaining evidence from the battlefield is difficult.

"We all have the same set of problems in terms of the collection of usable evidence," he said. "How can we collaborate with each other to make sure that our laws are enforceable and that charges will stick?"

Reintegration or prosecution?

Leuprecht says Canada could have acted sooner, toughening its laws to make it easier to prosecute returning fighters. Australia, for example, made it illegal simply to travel to some places without prior permission from the government.

He also says many of the Canadian mothers and children in custody could be candidates for reintegration, which Prime Minister Justin Trudeau spoke of in the House of Commons back in 2017.

"We also have methods of de-emphasizing or deprogramming people who want to harm our society, and those are some of the things we have to move forward on," Trudeau said at the time.

Prof. Christian Leuprecht of the Royal Military College of Canada says the federal government has put off addressing the question of what to do with Canadians captured on the battlefields of Syria for years. (CBC)

But getting them back to Canada wouldn't be easy.

Syria, after all, is still a war zone.

Leuprecht suspects Canadian Forces are already gaming out how to escort the Canadians out of Syria.

If the government were to go ahead with such a mission, it would face some hard questions from Canadians, he said.

"They might have even harder questions if the government funds and takes the risk of a mission to extract these folks and the mission goes pear-shaped and Canadian members are wounded or killed."

A right to a passport

In an email to CBC, Global Affairs Canada spokesperson Richard Walker said Canadian diplomats have established a communication channel with local Kurdish authorities to try to verify the "whereabouts and well-being of Canadian citizens."

"While every Canadian citizen — no matter how reprehensible — has the legal right to 're-enter' Canada, the Government of Canada has no legal obligation to facilitate their return," Goodale said in a speech last month.

Immigration lawyer Lorne Waldman believes Canada has a duty to provide any citizen a passport, if they request one.

"But that doesn't necessarily mean they have to pay for their ticket and all these other steps that might be necessary to get the people out," he said.

Unless, he says, a detainee can prove they are in danger if left in a prison camp.

The federal government insists it has reached no decision yet on bringing anyone back.

Either way, a question that's been quietly building for years seems to now require an answer.