SYDNEY (Reuters) - Australia’s government suffered an embarrassing defeat in parliament on Tuesday as the lower house voted to allow asylum seekers held offshore to receive medical care in Australia, the first such loss for a government in 78 years.

Independent lawmakers and the opposition Labor party voted together to pass the bill by 75 votes to 74, dealing a blow to the ruling conservative coalition, which is trailing heavily in polls ahead of an election due in May.

Prime Minister Scott Morrison, who had staunchly opposed the bill, responded by saying the measure could undermine national security, offering a preview of what is likely to be his campaign pitch, and the election’s central issue.

“Votes will come and they will go, they do not trouble me,” he told a news conference in the capital, Canberra.

“Where we will always stand, and the Australian people can always trust us to do, is to have the mettle to ensure the integrity of our border protection framework...the Labor Party demonstrated tonight they have no such mettle.”

Morrison’s government lost its lower-house majority at a by-election in October. His Liberal-National coalition’s six years in power has been marked by instability, with two prime ministers toppled by internal insurrections.

Its defeat, the first such loss of a lower house vote on a bill since 1941, comes as the government has struggled for months to close a six-point gap in Australia’s most widely watched opinion poll.

“It’s humiliating for the government,” said Rod Tiffen, a political analyst at the University of Sydney.

“I’m not sure if it’s going to have any great effect (on votes) but I do think it’s a precursor to what the government’s going to try and do in the election campaign.”

ASYLUM RELIEF

The bill must be approved by the upper house to become law, but is likely to pass, as the Senate supported an earlier version last year.

Labor representatives said it was about “doing the right thing”, and the vote provoked cheers from asylum-seeker activists in parliament’s public gallery.

“Great to see the Australian parliament finally vote for humanity,” Behrouz Boochani, an Iranian held in an Australian-run camp in Papua New Guinea (PNG), wrote on social network Twitter.

“Many people are happy now because they will finally receive medical treatment.”

Immigration policy requires asylum seekers intercepted at sea to be sent to camps in PNG and its northern island of Nauru, and they cannot set foot in Australia, even if they are found to be refugees.

Opponents of the policy introduced the measure to amend the Migration Act to allow the temporary transfer of “transitory persons” from PNG or Nauru to Australia for medical assessment, a move backed by doctors.

The United Nations has repeatedly criticized Australia over conditions in the camps, where it says detainees lack adequate medical and mental health care.