The Urgent Medical Treatment Bill has become law after passing Australia's senate, making it easier for doctors to facilitate medical transfers from offshore detention.
The bill passed the senate by two votes after it passed the lower house yesterday by one, marking the first defeat for a government in a legislative vote since 1929.
About 1200 refugees are exiled to Nauru and Papua New Guinea's Manus island, where they've been detained for almost six years.
6000 Australian doctors supported the bill through a petition organised by Sydney GP Sara Townend.
Dr Townend said Australia had a duty to provide quality health care to the refugees.
"The reason that that's clear is because we fund the healthcare there, we pay large amounts of money to a private medical contractor in order to provide that care but we don't audit the quality of health care that's provided. It's also clear that judges consider that this is our responsibility as well.
"So those people, they're refugees that have sought asylum in Australia... and because we are signatories to international conventions around this we do need to provide them with asylum and the things that go with it, which is healthcare.
"That's the reason doctors are concerned, and they're also concerned because we can see it's not being done well."