Australia's ruling party suffered a rare defeat in Parliament on Tuesday after the opposition joined minor parties and independent lawmakers in passing a bill that would give sick asylum seekers easier access to mainland hospitals.

Prime Minister Scott Morrison's conservative government argues that the bill, passed 75 to 74 by the House of Representatives, will undermine Australia's tough refugee policy. The policy banishes asylum seekers who attempt to reach Australia by boat to camps on the Pacific island nations of Papua New Guinea and Nauru.

The bill would allow doctors instead of bureaucrats to decide which asylum seekers in the camps can fly to Australia for medical treatment. It is likely to be made law by the Senate as early as Wednesday.

"This bill is acceptable in absolutely no form. It only weakens our borders, it does not strengthen them," Morrison said Tuesday.

Australian governments rarely lose votes in the House of Representatives, where parties need a majority to form an administration.

But the ruling coalition lost its single-seat majority when former Prime Minister Malcolm Turnbull quit politics after he was deposed by his party colleagues in August. Another lawmaker has since quit the government as part of the bitter fallout over the leadership change.

But Morrison on Tuesday ruled out calling a snap election on the refugee issue, saying Australians will go to the polls in May.

Refugee advocates applauded from Parliament's public gallery when lawmakers endorsed what they regard as a more humanitarian approach toward asylum seekers.

The Senate passed similar amendments on medical evacuations despite ruling party objections on the last day Parliament sat last year.

Australian security agencies warned in December that if those amendments became law, asylum seekers from Asia, Africa and the Middle East would likely head to Australia again in rickety fishing boats from Southeast Asian ports.

The people smuggling boat traffic has all but stopped in the past five years with the government promising that any refugees who arrive on Australian shores by boat will never be allowed to settle there.

Opposition leader Bill Shorten on Tuesday re-drafted the amendments passed by the Senate in December in an attempt to make the law less likely to attract a new wave of asylum seekers, who used to arrive in Australia at a rate of more than a boat a day.

The changes included a provision that only the 1,000 asylum seekers currently held on Nauru and Papua New Guinea and not any future arrivals would be considered for medical evacuation under the new regime.

The government had struck a deal in 2016 for the United States to accept up to 1,250 refugees languishing on Nauru and Papua New Guinea. The government had similarly made the offer only available to refugees on the islands at the time to avoid attracting new asylum seekers, Shorten said.

"I believe that we can keep our borders secure, we can uphold national security but still treat people humanely," Shorten told Parliament.

Medical evacuations have become a loophole in Australia's policy of exiling asylum seekers who arrive by boat.

Hundreds of asylum seekers who have been allowed into Australia for hospital treatment have received court injunctions that prevent their return to the islands.

Sick asylum seekers often have to fight the Australian government in court for permission to be transferred to an Australian hospital for treatment.

Law firm Maurice Blackburn welcomed the proposed change.

"It should never have had to come to this point, but it is evident this bill was urgently needed to force action," lawyer Jennifer Kanis said in a statement. "In the last year alone, we have had to take court action repeatedly to help secure the medical evacuation of 26 ill people on Nauru, many of these children."

"In a number of those cases, the delay in accessing medical treatment risked life-threatening consequences for the children and adults concerned," she added.

Home Affairs Minister Peter Dutton said he expected more boats to head for Australia in treacherous voyages that sometimes end in tragedy.

"There is no question that people smugglers will be hearing very clearly that the policy in Australia has changed," Dutton said. "This puts Australia back on the map for people smugglers and Bill Shorten has that on his shoulders."