A push to urgently transfer sick asylum seekers on Manus Island and Nauru to Australia has been put off until next year, with the government saved from a humiliating defeat.
Prime Minister Scott Morrison on Thursday vowed to use any tactic necessary to stop legislation to allow critically ill refugees to be flown to Australia for medical treatment on the advice of two doctors.
Conservative minor party senators Pauline Hanson and Cory Bernardi led the time-wasting efforts in the upper house, scuttling hopes the bill would be debated in the lower house.
The Greens, Labor and enough crossbench support secured its passage the Senate, but not in time to return to the House of Representatives for approval.
The government risked not passing legislation to give police access to encrypted messages before parliament rose on Thursday, despite Mr Morrison insisting it was vital to Australia's national security.
The government adjourned the lower house, meaning the encryption bill could not be changed in the Senate and become law before 2019.
Labor leader Bill Shorten agreed to pass the encryption bill without amendments, while also accusing the government of being embarrassed about losing a lower house vote on refugees.
"I don't want to go another two months, three months, until the government come back to work, and leave Australians at the risk of being exposed to security threats," he told reporters in Canberra.
After running down the clock on the refugee bill, the government avoided the first loss of its kind since 1929.
"I will do everything in my power to ensure that these suggested changes that would undermine our border protection laws never see the light of day," Mr Morrison told reporters in Canberra earlier on Thursday.
"I will fight them using whatever tool or tactic I have available to me to ensure that we do not undermine our border protection laws."
But Sydney independent Kerryn Phelps said the coalition has been been spreading misinformation about the amendment.
"This doesn't affect border protection policies. It will not restart the boats. The sort of rhetoric that we were hearing earlier is just plain wrong," Dr Phelps told Sky News.
She said she was sad the bill hadn't gotten up but was optimistic of its chances in February next year.
Greens leader Richard Di Natale branded both major parties a disgrace after it became clear the refugee bill would not pass.
"People who are being tortured at the hands of the Liberal government, we are denying them access to medial treatment," Senator Di Natale said.
While the numbers were against the minority Morrison government, they were not tested on the final day of parliament for 2018.
© AAP 2018