The nearly 500 Tamils who arrived on the MV Sun Sea last month must be kept in custody until Ottawa is absolutely sure of who they are, a government lawyer told a Federal Court judge Wednesday as she objected to the release of one of the passengers.

Ottawa is asking the court to overturn the Immigration and Refugee Board's decision to release four women from the ship after an adjudicator concluded the government wasn't taking reasonable steps to confirm their identities.

The court granted a temporary stay for three of their cases on Tuesday evening, keeping them in custody. It made the same order on Wednesday for a fourth woman. Ottawa didn't challenge the decision to release a fifth woman, who is pregnant and won her freedom on Monday.

Lawyer Helen Park told a hearing in Vancouver that if the government isn't absolutely certain who the migrants are, it can't know for sure whether any pose a risk to the Canadian public.

"Identity is the linchpin," said Park as she argued for a temporary stay for the fourth woman.

"They (Sri Lanka) recently finished a war, there were people who've done bad things on both sides, there's mass exodus, we don't know who's done what. That's why identity is so crucial, because they're trying to figure out and investigate who's done what."

The woman whose case was at issue on Wednesday had a national identification card, which government experts had concluded was probably an authentic document.

But the federal government said it still wasn't convinced of her identity, citing a 2009 report by the UK Border Agency that suggested someone with the right contacts in Sri Lanka can easily obtain a real national ID card or passport bearing "any identity they want."

"Genuine documents are so easy to obtain fraudulently, there is no need to forge them," says the report, excerpts of which Park read to the court.

"It is suspected that there are many more ID cards in circulation than the actual total population of Sri Lanka."

Last month, 492 men, women and children arrived on Vancouver Island aboard a cramped cargo freighter after months at sea. The 380 men are at a jail in Maple Ridge, B.C., while the women and most of the minors have been held at a youth jail in nearby Burnaby. Their names are all protected under a publication ban.

The Immigration and Refugee Board has been holding detention review hearings at intervals since their arrival, and so far, all but five have been ordered back into custody.

The federal government has been arguing for their detention because their identities haven't been confirmed, although in one case a man was ordered detained over possible links to the Tamil Tigers.

Robert Blanshay, the lawyer for the woman whose case was heard at Federal Court on Wednesday, said the federal government was presuming the migrants "guilty until proven innocent" and had failed to provide any evidence his client either poses a risk or has fraudulent documents.

"The minister is casting a blanket over my client and all those coming from Sri Lanka because she's got a national identity card but there's documentary evidence that you can obtain a fraudulent national identity card," Blanshay told the hearing over the telephone from Toronto.

"Well, you can say that about any country -- you can obtain a fraudulent Ontario driver's licence -- but you have to draw the connection between these concerns and my client."

In the end, Judge Yves de Montigny granted a stay of the immigration board's decision until at least Thursday when he will hear more detailed arguments about the woman's case.

He said it wouldn't make sense to release the woman before making a final decision on the government's challenge of the immigration board's decision.

"It's always a difficult balancing act between two vital interests, that is the freedom interest of the respondent and the security/identity concerns of the government," said de Montigny.

Last year, when 76 Tamils arrived aboard the MV Ocean Lady, the federal government launched similar challenges when the Immigration and Refugee Board ordered them released.

Earlier this year, court overturned the decision to release one of the Ocean Lady passengers, who the federal government argued could be linked to the Tamil Tigers, a banned terrorist group. But he, too, was eventually released and is awaiting the outcome of his refugee claim.