A federal court judge has chewed out government lawyers for using tactics in court that would keep Tamil migrants in jail indefinitely.

Justice Edmond Blanchard said it was unacceptable for Department of Justice lawyers to file multiple, concurrent judicial reviews of release orders -- especially after the court has already upheld a decision to release a migrant.

"In my view, this would result in nothing short of an abuse of process," the judge wrote in a decision released last week.

The end result for the prisoners is a Kafkaesque nightmare where despite being ordered released repeatedly, they are still in prison, said a lawyer for two of the Tamils in this situation, Gabriel Chand.

"It's frustrating," said Chand. "I've never been in a situation where I've gotten someone released three times and they're still in their prison reds. It's cruel and unusual."

Chand said the decision is a sign that the government's zeal to keep the Tamils in prison on suspicions of being involved in a terrorist organization is leading to illegal shortcuts.

"After the release order, the minister simply wouldn't release my client," said Chand. "In my view, and I told the minister this, it was unlawful detention."

Blanchard's ruling was an unusual rebuke for a justice to issue against the government, and it comes just a week after Immigration Minister Jason Kenney attacked Canada's judiciary for failing to deal with refugee claimants swiftly.

The judgment refers to the case of B386, one of the 492 Tamil migrants who came ashore on the M.V. Sun Sea in August. A publication ban prevents the media from identifying the refugee claimants.

B386 was ordered released by the Immigration and Refugee Board on November 19 because they believed he was not a security threat. That order was appealed by the Department of Justice, and B386 stayed in prison.

Each migrant has a detention review hearing every 30 days. In B386's next hearing on December 23, he was ordered released again. That order was also appealed. And on January 25, B386 was ordered released again, and the government appealed that one as well.

The appeal of the first release order wasn't held until February 8, and the government lost. B386 was again ordered released.

But instead of accepting that decision government lawyer Timothy E. Fairgrieve argued that the stack of appeals that were piling up still needed to be dealt with, and the Tamil should remain in prison.

Justice Blanchard concluded that taken to its logical conclusion that tactic would mean B386 could be in jail forever.

"Potentially, this cycle could be unending and the (Tamil refugee claimant) would never benefit from a positive decision of the court upholding a release order," Justice Blanchard wrote. "This cannot be what was intended by Parliament."

And he dismissed Fairgrieve's arguments that there was new information in the case that had to be considered.

"All of the significant information underlying the new grounds for detention…was available to the minister as early as the end of September," said Blanchard.

CTV News interviewed another Tamil, B188, who was in a similar situation.

"When I was released, I was happy," B188 said. "When I was detained again, I was so upset. I was so worried. Why are they detaining me?"

B188 has been released from prison and is now trying to make a living in Canada. Chand says he expects B386 to be released shortly as well.

With a report from CTV British Columbia's Jon Woodward