But the father will be prevented from seeing his son inside the detention residence, instead forced to abide by the regular visiting hours at the secure housing complex in Sydney where the mother and baby will be held. He will only be permitted in the designated visitors areas and cannot spend the night.

The restrictions are a further blow to Ranjini, who was granted refugee protection by Australian authorities and previously was free to live in the community with her husband Ganesh before the adverse security assessment.

The two met in Australia and married last year, living in Melbourne's north-east.

A newly pregnant Ranjini and her two sons from a previous marriage in Sri Lanka were given just five minutes' notice in May of a decision to return her to detention. She was then sent to Villawood, in Sydney's west, and has not been told the reasons for the ASIO findings.

Until recent changes introduced after a High Court decision, she had no appeal but could not be returned to Sri Lanka, leaving her in an indefinite detention one Labor MP described as a ''legal black hole''.

The newborn boy, to be called Paartheepan - or ''lighting of the world'' - was born on Tuesday night and is an Australian citizen and not formally required in detention. But it is believed the family has decided not to remove him from his mother.

Lawyer David Manne, who brought the legal challenge to the ASIO assessments on behalf of another client, said breaking up the family was deplorable.

''It is completely unnecessary and inhumane to lock up a mother and her newborn baby,'' he said.

''As a matter of basic decency, humanity and common sense, the government should exercise the discretion it has to release her into the community with her husband. Our country can surely do better.''

Ranjini's case is to be examined under changes introduced in October that will allow an independent review for more than 50 refugees held in indefinite detention with adverse ASIO findings. But the security organisation's chief will retain the power of a final determination.

Ranjini fled to Christmas Island in 2010. It is believed her former husband, who died in Sri Lanka's civil war, had been a driver for the separatist Tamil Tigers.

A Ranjini supporter, Anthony Bieniak, from Melbourne, who set up a website, lettersforranjini.com, said he had received more than 200 letters of support for the family.

A spokesman for the Immigration Department declined to answer questions from Fairfax Media, citing operational and privacy reasons, but said officials were in close contact to support the family.