Senator Derryn Hinch, who supported the initial bill for medical evacuations past year, had asked for security briefings before the Senate voted on the bill.
During debate on Labor's amendments to the bill, Finance Minister Mathias Cormann told the Senate that "rapists and paedophiles will still get a free pass into this country".
But the legal advice also noted that parliament and not the high court was the final arbiter on the proposal before it, in essence reinforcing the discretion of the parliament to chart its own course.
The Bill passed with the support of the main opposition Labor Party and cross-benchers from the left-leaning Greens and independent MPs.
He said he was confident anyone who was transferred to Australia would remain in detention while receiving treatment.
Scott Morrison was the immigration minister who restored control of Australia's borders. He said Australia's border protection regime could not be adjusted without serious consequences.
Thunder complete largest comeback in team history to beat Rockets
The loss puts the Rockets in fifth place in the Western conference and 7.5 games behind the Golden State Warriors . He was carrying a shoulder knock after contact with the 110kg centre Steven Adams. "He's a pretty strong guy".
"My job now is to do everything within my power, and the power of the government, to ensure that what the Parliament has done to weaken our borders does not result in boats coming to Australia", he said. "Every [boat] arrival is on Bill Shorten's head".
Morrison and his government staunchly opposed the bill, saying care available at the detention camps was adequate and the bill could open a loophole for asylum-seekers to exploit.
Under the new laws, the home affairs minister will have 72 hours to make a decision on whether to agree to a medical transfer.
Immigration policy requires asylum seekers intercepted at sea to be sent to camps in PNG and its northern island of Nauru, and they can not set foot in Australia, even if they are found to be refugees.
Morrison last week ruled out calling a snap election if his government was defeated over the "stupid" bill. He said he had no intention of going to the polls early, and the election would be in May.
The legislation will now go to the Governor-General for royal assent to become law, but the timeframe for this remains unclear.
- Major League Baseball rumors: Bryce Harper won't sign short-term deal with Giants, anyone else
- Remarkable Russell Westbrook sets NBA record with 10th-straight triple-double
- Cops Say Phone Records Jussie Smollett Provided Isn't Enough To Prove Assault
- Texans to release veteran WR Demaryius Thomas
- Nissan cuts outlook and books Ghosn charges
- Savage to be Released from ICE on Bond
- All schools closed in Ottawa on Wednesday
- Fed Cup: Romania upset Czech Republic, Australia beats USA
- Thousands evacuated after New Zealand wildfire
- Johnson triggers wreck, then wins Clash at Daytona