A young female asylum seeker who was allegedly raped on Nauru has been flown to Australia for medical treatment.

Key points: Asylum seeker who was allegedly raped flown to Australia for medical treatment

Asylum seeker who was allegedly raped flown to Australia for medical treatment Victim was allegedly assaulted in May on Nauru

Victim was allegedly assaulted in May on Nauru She has since attempted suicide twice, family say

The 23-year-old Iranian was allegedly assaulted in May while returning to the Australian-run detention centre.

Her family says she has since been on a hunger strike and attempted suicide twice.

The Immigration Department said she was flown off the Pacific island by air ambulance on Thursday night.

"Given advice from our medical providers ... International Health and Medical Services [IHMS] ... we've agreed that she should be transferred to Australia for medical care," department secretary Michael Pezzullo said.

"The individual has been receiving appropriate medical and mental health support on Nauru," a department spokesperson added.

The department said it received a transfer request from IHMS on Wednesday afternoon and approved it that evening.

The woman has reportedly been kept in a separate compound away from her family since the alleged assault.

Greens senator Sarah Hanson-Young has been calling for the woman's transfer and said it should have happened immediately after the alleged rape.

"She's now in a very, very difficult medical situation and thankfully she's now being flown to Australia," Senator Hanson-Young said.

"The fact that it's taken three months to get her here is just unacceptable.

"But of course I'm glad after advocating for her that we've finally been able to get her out of that awful place."