The government said the woman was flown from the Pacific island to Australia on Thursday, local media said.Refugees who try to get to Australia by boat are detained in off-shore centers like the one on Nauru.
The family of the Iranian woman, 23, said she had harmed herself in the wake of the alleged attack.
“Given advice from our medical providers … we’ve agreed that she should be transferred to Australia for medical care,” Immigration Department secretary Michael Pezzullo told the Australian Broadcasting Corp.
“The individual has been receiving appropriate medical and mental health support on Nauru,” Mr Pezzullo said.
Australia’ s border protection agency, the Australian Border Force, confirmed earlier this month it was aware of the incident and was taking the allegations seriously.