Canada's immigration minister says he will not apologize for tactics that have kept Tamil refugee claimants in prison despite court orders for their release.

And in a comment that sounded alarm bells for some observers, Minister Jason Kenney said he would tell government lawyers to continue using a tactic a Federal Court judge said went too far.

"We make no apologies about this. That's what Canadians expect -- us to enforce immigration law and make sure people who may constitute a security risk are not released," Kenney said in a scrum in Vancouver.

Last week, Justice Edmond Blanchard slammed the federal government for exploiting a legal loophole that could keep some of the migrants who arrived in B.C. on a boat from Sri Lanka in prison forever.

CTV News learned of two prisoners who had been ordered released in November, had a federal court order upholding their release, but the federal government refused to let them go.

"In my view, this is nothing short of an abuse of process," said Blanchard in a ruling.

While judges do not typically comment on political reaction to their decisions, observers were very concerned that the federal government may be flouting the courts.

"I'm going to give the minister the benefit of the doubt and suggest that was an off the cuff remark," said David Eby of the B.C. Civil Liberties Association.

"Surely the government wouldn't ignore a court ruling -- after all, they expect citizens to abide by the court rules," he said.

Opposition MP Ujjal Dosanjh said the government should be concerned about security risks that some Tamils pose, but ignoring a court order goes into dangerous, lawless territory.

"We all hate terrorism. We all want to be safe. But government shouldn't be undermining institutions that are there for the protection of us all," Dosanjh said.

In a press conference in Vancouver, Prime Minister Stephen Harper said he wouldn't comment on anything that was before the courts.

At issue are tactics used by federal government lawyers in the cases of two Tamil migrants, who can only be identified by number, B188 and B386.

The court found that B188 was a Tamil journalist who covered the war in Sri Lanka between the government and the rebel Tamil Tigers.

In 2009 he was hit in the neck by shrapnel during a firefight. He recovered in hospital, but feared for his life, and paid thousands to board the M.V. Sun Sea and come to Canada in August.

"When we reached Canadian soil, we put our feet down, and that's when we had some hope," the journalist said in an interview with CTV News.

The Immigration and Refugee Board found that there was no credible suspicion he was a security threat, and ordered him released in November. The government appealed, and the federal court upheld the release order.

But instead of releasing B188 as per the court order the government launched another appeal at the Federal Court.

"When I was released, I was so happy. When I was detained again, I was so upset," said the journalist.

In the case of B386, who says he worked as a waiter in Sri Lanka, the IRB ordered him released in November as well. By the time the federal court upheld that ruling, the government had already appealed twice more.

Justice Blanchard saw that as a path to keeping B386 in prison forever, and rebuked the government for using such tactics.

492 Tamil refugee claimants arrived on the M.V. Sun Sea in August. Of those, 95 still remain in custody.