Australian MPs have passed a landmark bill with an opposition amendment making it easier for sick refugees held offshore to be treated in the country.
This is the first time in decades a government has lost a vote on its own legislation in the lower house.
The move is a blow for PM Scott Morrison’s minority government’s highly controversial immigration policy.
Since 2013, Australia has sent asylum seekers arriving by boat to detention centres on Nauru and Papua New Guinea.
Critics say it has harmed the welfare of detainees, including children.
Doctors have long warned of inadequate medical facilities on the islands, while the UN has previously described the camp conditions as “inhumane”.
However, Mr Morrison said: “There is no form of this bill that does not weaken our border protection.”
Australia has long defended its offshore detention policy by arguing that it stops deaths at sea and disrupts the trade of people smuggling.
The bill passed in the House of Representatives by one vote after the Labor opposition, the Greens and crossbench MPs agreed on last-minute amendments.
It is expected to sail through the upper Senate later this week where it will become law.