The Commonwealth has been ordered to bring a young girl from the Nauru detention centre to Australia for urgent psychiatric treatment, with warnings she could take her own life without intervention.

The Federal Court has found the refugee, whose exact age has been withheld, arrived on Christmas Island with her family in 2013 while trying to travel to Australia by boat.

She has been on Nauru ever since, and has already tried to take her own life.

In a judgment published today, Federal Court Judge Bernard Murphy granted an urgent injunction by her family's lawyers to bring her to Australia because there were no specialist child psychiatrists permanently based on Nauru.

"There is an extreme risk this unfortunate young girl will commit suicide or otherwise self-harm, or that her mental health will further deteriorate," Judge Murphy said.

"Being stuck on Nauru since 2013, coupled with the recent separation of her parents, appears to have taken a serious toll on the applicant's mental health.

"The injury or damage the applicant may suffer if an injunction is refused — death or a further serious deterioration in her health — carries far more weight in the balance than the wasted expenditure the Commonwealth may suffer if an injunction is granted."

Evidence presented to the court included notes from a counsellor employed by IMHS, the company contracted by the Commonwealth to provide health services on Nauru.

Among the notes was a reference to the young girl drawing, "a picture of a heart and next to it was a heart broken in two", and a comment that her mother was sleeping in the same room, "due to a continuing fear that she might commit suicide".

Nick Martin, a former senior doctor with IMHS who has previously alleged asylum seekers with severe medical conditions could die due to delays in accessing treatment, told the court mental health care on Nauru was "basic".

Judge Murphy said the young girl's psychiatric condition was "very serious", and that she posed an "extreme suicide risk".

"She should be immediately admitted into a specialist child mental health facility for assessment, containment and treatment," Judge Murphy said.

"There is no such facility on Nauru."