Labor has voted for new laws to allow police to crack into encrypted communications apps such as WhatsApp and iMessage, despite a number of Labor MPs complaining that the legislation was "flawed".
The legislation will require tech companies to help law enforcement access the encrypted communications people are making on their platforms or devices, if those people are being investigated for serious crimes, including but not limited to terrorism offences.
It was introduced into parliament in September, after a short public consultation in August.
The laws have been widely condemned by civil groups and tech companies, stating that by forcing tech companies to make weaknesses in their own systems for specific criminal cases, it would make it weaker for everyone else.
Late on Wednesday night, a parliamentary committee made up of Labor and Coalition MPs put out a short report recommending a number of changes to the legislation, including defining what is called a "systemic weakness" – that is a weakness that would affect everyone using a phone or app for example – that tech companies could refuse to help law enforcement out with.
Among the other recommendations were that the notices issued to companies to force them to help law enforcement would also need the approval of both the attorney-general and the minister for communications, whereas only the attorney-general had to sign off before.
And in situations where tech companies argue that what they're being asked to do would create a systemic weakness, a judge and a technical expert would both need to sign off on it.
At 9am, 173 amendments to the legislation that the government said reflected these recommendations were put to the parliament. Just after 12:30pm, the legislation passed the House of Representatives.
Several Labor MPs, who had in the past been critical of the government seeking to rush the legislation before parliament finishes up for the year on Thursday, spoke critically of the legislation, before indicating they would vote for it.
Shadow attorney-general Mark Dreyfus said that the legislation, unamended "could well do more harm than good".
"It could impose a significant risk to Australia's national security, jeopardise security cooperation with the United States, and create unnecessary risks for Australian businesses," he said.
Dreyfus even said during his speech that he was still attempting to resolve disputes over some of the issues in the bill as he was speaking about how he would support it to pass.
Labor MP Mike Kelly said there were "concerns about the security risks posed by the bill and of course the commercial risks".
"We need the ability to test that evidence, to properly get informed about that evidence," he said.
He said that by passing the bill with new review mechanisms built into it, it was more like an interim bill that could be changed in the future.
This point was picked up by Labor MP Julian Hill.
"I say very clearly the bill is flawed. The original version was hopeless," he said. "If it is not fixed by this government, I think it should be fixed by the next Labor government."
Former Telstra staffer and Labor MP Tim Watts, who had been critical of the legislation on Twitter earlier this week, said Labor was supporting the legislation to be "sensible".
"If you're not a subject of law enforcement enquiries, you're not going to have to worry about being a target of this bill," he said.
But he said that it should have had more time to be assessed.
"It would have been nice to spend more time considering these proposals through a rigorous committee process," he said.
Chifley MP Ed Husic said the UK parliament had by comparison spent an "extraordinary amount of time" assessing similar legislation. He said people were concerned that if encryption was weakened in any way, that in the longer term it would be watched by people who want to cause harm.
"There is absolutely no walking away from the fact that we do need to absolutely target those of us who want to do us harm," he said. "We don't want to inadvertently want to do harm ourselves, so this is a process that needs to be given thought."
"There are a lot of us in this place that have recognised the challenge in doing this and are troubled by what has been proposed."
He said some tech companies might withhold apps from Australia to avoid being subject to the legislation, and he said that it was "not the end of the debate".
Greens MP Adam Bandt, who was one of only two MPs to vote against the legislation, said it would make Australia "less secure" and would threaten the tech industry and the legislation attacks civil liberties.
"This now opens a door into people's private communication with each other," he said. "Communications that we all have with our banks, with people we buy things from over the internet. Now all of this is going to require to be unlocked."
Independent MP Andrew Wilkie, the only other MP to vote against it, said that national security agencies would always ask for more powers, but it was up to politicians to determine when to say "no".
The amendments were originally supposed to be voted on in the Senate, however the government pushed to have them voted on in the House of Reps first.
This is because the government was concerned that amended immigration legislation from the Greens, crossbench and opposition that would allow refugees to be transferred from Manus Island and Nauru detention centres to Australia for medical treatment was going to pass the Senate against the government's wishes.
In that event, the manager of opposition business in the House of Reps, Tony Burke, indicated that the government planned to shut down the House to prevent the legislation passing there.
While Labor ultimately agreed to pass the amendments to encryption legislation in the House of Representatives, it indicated there would be more amendments in the Senate, which would force the government to keep the House of Reps running in order to pass the encryption legislation before the end of the year.
Labor ultimately acquiesced to the government's demands after the House of Representatives finished at 5pm and agreed to drop the amendments in the Senate in order to pass the legislation on Thursday, and not early next year.
Opposition leader Bill Shorten said that the proposed Labor amendments would need to be dealt with in the first sitting week of 2019, starting on February 12.
Josh Taylor is a Senior Reporter for BuzzFeed News and is based in Sydney.
Contact Josh Taylor at firstname.lastname@example.org.
Got a confidential tip? Submit it here.