Immigration Minister Peter Dutton's department has promised to fly the girl - as well as her family - to the Australian mainland.
A mentally unwell refugee girl, who has attempted suicide several times, will be rushed from Nauru to Australia for urgent care after lawyers took court action.
In a Federal Court hearing in Melbourne on Saturday, Immigration Minister Peter Dutton's department promised to fly the girl - as well as her family members - to the Australian mainland on Sunday.
It comes after legal firm Maurice Blackburn lodged an urgent application on the girl's behalf on Friday night, asking for her to be transferred off the island in light of her health.
The firm's head of social justice Jennifer Kanis welcome the decision but she said it was "outrageous" that it took court action to get the girl the help she needs.
"We're delighted that the government has this morning agreed to bring our client from Nauru to Australia so that she can get the medical attention she so desperately needs," she said outside court.
In court, Mr Dutton's legal counsel Ashlee Briffa said flights were being booked for the refugee family to travel to Australia on Sunday afternoon.
She said a doctor's report on the girl's health had only been received by the department on Friday.
"We were made aware of the medical report less than 24 hours ago,' Ms Briffa said.
"There is a flight tomorrow. This has all happened very quickly."
However Maurice Blackburn claimed the medical report was more than a week old and the department should have been aware of it.
"We don't know why the government are saying they haven't been provided with that report," Ms Kanis said.
The Federal Court is usually closed on Saturdays but the court agreed to hear the urgent application given the circumstances.
Ms Kanis said the girl's medical condition was "very severe".
"She has made numerous attempts of suicide and there is a very real risk she may attempt suicide again," she said.
Ms Kanis said it was the third time in recent months that court intervention had been sought to get children medical treatment.
If you are struggling mentally contact lifeline crisis support and suicide prevention on 13 11 14 or visit lifeline.org.au.
Multicultural Mental Health Australia www.mmha.org.au.