Australia’s law enforcement agencies have a wide range of new encryption-busting powers after Labor dropped all opposition to a highly contentious bill and let it pass without extra changes it claimed all day were needed.

The bill passed into law by 44 votes to 12 in the senate, having already cleared the lower house where just two MPs voted against it.

The law gives law enforcement the power to ask technology companies to create - and then seed - a vulnerability on "one or more target technologies that are connected with a particular person".

Passage of the bill was achieved after it looked destined to fail.

It was only a last-minute offer - made through a press conference by Opposition Leader Bill Shorten and Shadow Attorney-General Mark Dreyfus on Thursday night - that cleared its path.

Shorten said that Labor wanted to pass the encryption bill into law tonight “so we at least give our intelligence agencies some of the tools they need”.

“We offer to let the bill go forward, without the amendments which are needed...provided the government agrees on the very first sitting day, to pass the amendments we say are needed,” Shorten said.

“What we say to the government right now is if you agree to do the amendments that you’ve already agreed to do to the encryption laws in the first week of next year, we will pass the encryption laws - unsatisfactory as they are - right now.

“I’m not willing to go home and see a terror event happen - which we’re told is less likely than more likely - but I’m not going to have on my conscience [Prime Minister Scott] Morrison’s hostage-taking tactics where he cancels his own work, goes home and lets Australians swing in the breeze.”

Shorten indicated Labor had reached agreement with the Coalition on the five sets of extra amendments the party sought to introduce to the senate tonight.

As a result, he was seeking a commitment that agreement would carry in good faith if Labor waived the encryption bill through the senate.

The leader of the government in the senate, Matthias Cormann, said the government would accept the offer.

"I confirm that the government has agreed to facilitate consideration of these amendments in the new year in government business time," he said.

"I also confirm that the government supports in principle all amendments that are consistent with the recommendations of the Parliamentary Joint Committee on Intelligence & Security (PJCIS) in relation to this bill."

However, Attorney-General Christian Porter later said the consideration of the amendments was conditional.

"To ensure the passage of the bill through the Senate tonight, the government has agreed to consider Labor’s proposed amendments in the new year if any genuinely reflect the recommendations of the parliamentary joint committee on intelligence and security," Porter was quoted by several media outlets as saying.

Senate caught off-guard

Labor's shift caught even the senate off-guard, and led to farcical scenes as senators learned that the amendments they were debating had been pulled.

It was also a sizable backdown on Labor’s position throughout Thursday. The party repeatedly stated its support for the encryption bill was predicated on the approval of extra amendments to be raised in the senate.

With the lower house adjourning for the year, that meant the encryption bill was as good as dead, since any amendments introduced in the senate would need to go back to the lower house for final approval.

The first available option for that to occur was February 12 next year.

But Labor shocked observers by saying the bill’s powers could not wait, and that it would pass the bill even though it considered the text “inadequate”.

Earlier, Labor had said that the encryption bill as it stood did not even reflect the findings of a rushed report by the PJCIS tabled at nearly 8pm Wednesday night.

The government started the day by providing Labor with a 50-page document of 173 amendments in response to the PJCIS interim report at 6.30am.

The same set of amendments was published at 9.22am, giving MPs other than from the major parties no time to even consider their substance before being asked to vote on them.

Even Labor complained that the few extra hours it had to go through them had not been enough.

But it did not stop Labor passing the bill in the lower house and sending it to the senate.

Deal scrapped

By lunchtime, the encryption bill appeared destined to fail as Labor accused the Coalition of reneging on a written commitment between Attorney-General Christian Porter and shadow Attorney-General Mark Dreyfus.

The commitment was that “the government commits to introduce the new agreed amendments in the senate, subject to the passage of the bill through the House of Representatives without amendment”.

Manager of opposition business Tony Burke and Mark Dreyfus said the government had reneged on that deal by introducing changes into the House of Representatives, and asking Labor to vote them through without having time to review them.

Burke said that in the short time Labor had had to review the amendments, they fell short of Labor’s demands and the recommendations of the PJCIS report.

Therefore, he said, “we will pursue further amendments in the senate which will then come back to this house for this bill to be finalised.”

Porter countered that PJCIS’ late report - tabled a few minutes before the 8pm close of parliament last night - forced the government to alter its approach to the bill.

“It is the case that I indicated in a letter that we were intending to move the amendments in the Senate,” Porter said.

“That was based on an agreement between the shadow Attorney-General and I that the PJCIS would report [Wednesday] in a way that would allow us to move the bill through the House of Representatives yesterday.

“So the undertaking to move the amendments in the Senate was based on the agreement that this bill would already be in the senate [by Thursday morning].”

Porter also accused Labor of breaking the deal by having too many MPs speak during the debate, rather than simply pass the legislation up to the senate.

“We agreed, if I recall correctly, that there would be a very small limited number of speakers so we would be able to facilitate this bill through the house yesterday, and that didn’t happen and that agreement was breached,” Porter charged.

“The idea that we’re somehow in breach of an agreement is totally false.”

Political pawn

For a farcical period on Thursday, the encryption bill also morphed into a piece of political leverage.

Labor and other parties had sought to pass a bill in the senate to allow medical evacuation of refugees on Nauru. Had that bill passed, it would have been sent to the lower house where the government appeared to lack the numbers to defeat it.

In response, Prime Minister Scott Morrison said he would consider closing the lower house early.

Knowing the government was also desperate to pass the encryption bill, Labor tried to use that as leverage to keep the lower house open - long enough to also see the refugee bill through.

The refugee bill was scuttled by filibustering in the senate, and the lower house closed for the Christmas break.

However, the lower house’s adjournment meant it also could not consider any changes to the encryption bill that were introduced by the senate.

That raised the distinct possibility that the bill would be delayed until February. However, Labor ended that possibility by backing down completely.