Opposition Leader Bill Shorten has defended Labor's role in a chaotic final parliamentary sitting day of the year, saying he secured "half a win" on a landmark encryption bill despite ongoing concerns.

Mr Shorten also stood by his support for migration law amendments that make it easier for asylum seekers in offshore detention to get medical transfers to Australia, after Prime Minister Scott Morrison said Labor's position was evidence it is a "risk to our borders".

Bill Shorten and Scott Morrison. Credit:Alex Ellinghausen

Speaking to the media on Friday, Mr Shorten said Labor had ultimately backed the Assistance and Access Bill — giving security agencies new powers to obtain the encrypted communications of criminal suspects — as he felt the need to reach a compromise before the Christmas break.

"I thought it was important that we reach at least a sensible conclusion before the summer on the important matter of national security. We will seek to improve the legislation in the new year. There are legitimate concerns about the encryption legislation but I wasn't prepared to walk away from my job and leave matters in a stand-off and expose Australians to increased risk in terms of national security," he said.