31 babies born to asylum-seeker parents in Australia will be allowed to stay on the mainland as part of a one-off arrangement.
The immigration minister Scott Morrison has announced that the babies and their families would not be transferred back to the Nauru detention centre.
His announcement came before the full bench of the Federal Court's judgment of the baby Ferouz case, which was due to be handed down on Thursday in Brisbane.
Baby Ferouz was born just more than a year ago in Brisbane's Mater Hospital to Rohingya parents from Myanmar, who arrived on Christmas Island in September last year.
The boy's mother, Latifar, was flown from Nauru to Brisbane to give birth following complications during pregnancy.
The Australian government argued Ferouz could not apply for a protection visa because he was an unauthorised maritime arrival.
Now, however, Mr Morrison says the 31 babies' claims for refugee protection will be assessed as part of a legacy caseload of 30,000 asylum seekers who arrived under the previous government.
Eighty family members related to the babies will also get to stay in Australia.
But Mr Morrison says it is a one-off arrangement.
He says pregnant asylum seekers transferred to Australia who had not given birth before Thursday would be returned to Nauru with their babies at an appropriate time.
And babies born to asylum-seeker parents on the Australian mainland in the future would also be returned to detention on Nauru.