A young girl at "extreme risk" of self harm at the Nauru detention centre has been brought to Australia after the Federal Court ruled she needed specialist mental health treatment.
The girl, not yet a teenager, arrived at Christmas Island in 2013 with her family as an unauthorised arrival.
They were placed in Nauru's offshore processing centre and granted temporary settlement visas after being deemed to be refugees.
Federal Court Judge Bernard Murphy heard the girl's case in December last year, with the details of his findings handed down on Friday.
He noted the separation of the girl's parents and years on Nauru without hope of resettlement had taken a toll on the child's mental health.
She attempted to take her own life on December 9 and continued to express the wish to end her life, the court heard.
A report by child psychiatry specialist Louise Newman stated at the December hearing that the girl was at "extreme risk" of suicide, may have been developing a psychotic depressive illness and should be urgently moved to Australia for treatment.
The federal government confirmed on Friday the girl had been flown to Australia for treatment.
"The Department of Home Affairs can confirm a refugee has been transferred from Nauru to Australia for medical treatment," a spokesperson said.
"The Department does not comment on individual cases."
The December judgment said the commonwealth government and Minister for Immigration and Border Protection had declined requests for her transfer,.
Judge Murphy granted an urgent injunction to bring the girl to a place with a specialist child mental health facility.
National Justice Project principal solicitor, George Newhouse, whose firm is acting on behalf of the family, called for privacy.
"This is an extremely sensitive matter which is set out in some detail in the judge's observations," he said in a statement on Friday.
"Given the nature of what is disclosed in the decision, the family have asked that they have some privacy at this time."
Readers seeking support and information about suicide prevention can contact Lifeline on 13 11 14 or Suicide Call Back Service on 1300 659 467.