The federal government has been telling Tamil refugee claimants to pay tens of thousands of dollars to the smugglers who brought them here -- or Canada won't let them out of jail.

Government lawyers argue that it's a way to ensure the migrants won't be influenced by smugglers when they're let go. But critics say the tactic funnels money to smugglers the government is trying to hurt.

"It's shameful," said Ujjal Dosanjh, the Liberal candidate for Vancouver-South. "This is an extortion of the refugee claimants to pay the smugglers who are the guilty party in the first place."

CTV News reviewed 15 transcripts of detention reviews conducted by the Immigration and Refugee Board where debt to smugglers was a factor in detention.

In one of those cases, debt was the only factor that kept a Tamil migrant detained in January. But that migrant was able to show his family had paid his debts by February -- and he was ordered released.

Immigration Minister Jason Kenney seemed incredulous when asked about the issue at a campaign stop in Vancouver-Kingsway on Wednesday morning.

"I think that's ridiculous," said Kenney. "Paying a smuggler is an illegal activity. The government of Canada wouldn't countenance facilitating someone paying their debt."

About ten minutes later, the minister addressed the issue again.

"It's quite legitimate for our lawyers to take that position," he said. "We make no apology for ensuring that the law is enforced."

The law he's referring to is regulation 245-F, which says that if a refugee claimant owes money to a smuggler that can be a factor in deciding whether they can be released from prison.

The idea behind the regulation is to make sure refugees don't go underground to pay debts to smugglers, said immigration lawyer Eric Purtzki.

"If someone is beholden to a smuggler they might be unlikely to appear for a future appearance," he told CTV News.

But Purtzki said the rule forces his and other clients to pay the very smugglers the government is trying to attack.

"Often times individuals will contact their family back home in Sri Lanka and say to them that they need to pay the smuggler," he said.

In many cases reviewed by CTV News, the migrant or their lawyer presents evidence that the debt has been paid in the form of an affidavit from a relative, or mortgage or land sale documents.

Sometimes, a government lawyer challenges the legitimacy of those documents and argues that the migrant should remain incarcerated.

The outstanding debt for the migrants ranged from $5,000 to $28,000 in the decisions surveyed.

Dosanjh said that if a Liberal government is elected they would examine repealing the rule.

In August, 492 ethnic Tamil refugee claimants arrived on B.C. shores after the defeat of the Tamil Tigers, or LTTE, a banned terrorist organization, in the Sri Lankan civil war.

The government says it is keeping Tamil migrants in jail in cases where their identity hasn't been confirmed or there is suspicion of terrorist involvement.