(CNN)The Australian government has lost control of the parliament for the first time in almost a century, losing a major vote on a bill to help evacuate critically ill refugees from offshore processing centers.
The ruling Liberal National coalition was firmly opposed to the legislation, which it said would endanger national security, but it passed Australia's lower house by a vote of 75 to 74.
The opposition Labor Party and a group of independent MPs supported the legislation.
It is the first time an Australian government has lost a substantive vote in the House of Representatives since 1929, according to the parliament's website.
At that time, the sitting Australian leader called an election. Despite his historic loss, Prime Minister Scott Morrison has refused to do the same.
Under the legislation, asylum seekers detained on Australia's controversial offshore detention centers can more easily be evacuated to the mainland for medical assistance if they become critically ill.
The government has faced criticism in the past year for allowing seriously unwell detainees to linger, including a 12-year-old boy who had refused to eat for weeks.
The new law would provide a clearer path for asylum seekers on the Australian offshore camps on the small island nation of Nauru or Papua New Guinea's Manus Island to fly to Australia for treatment.
The legislation was introduced by independent MP Kerryn Phelps, a former head of the Australian Medical Association. It still needs to pass the Senate at a future date before it becomes law.
In a defiant speech before the vote, Morrison said the legislation would weaken Australia's border protection regime, without specifying how.
"I will not stand here and have this parliament give itself the excuse to weaken the border protection framework," he said.
But the Australian government's policies to stop refugees arriving in the country by boat have faced stern international criticism. Medical professionals from Doctors Without Borders said in November the situation was "beyond desperate."
"Now the children, some of them, they are not eating, they are not drinking, anything, they are just lying on the bed, doing nothing... sometimes their parents have to take them to the hospital to feed them, by needle," Doctors Without Borders psychologist Natalia Hverta Perez said in a video posted to social media.
Amnesty International said the Australian asylum seeker camps on Nauru were an "open-air prison."