Under new laws to pass the upper house, Australia's domestic spy agency ASIO will get broad new powers to combat terrorism threats at home.
Australian spies will soon get stronger powers to help fight against terrorism.
The government's first tranche of tougher anti-terrorism laws, which beef up the domestic spy agency's powers, passed the Senate on Thursday with bipartisan support.
Anyone who identifies an ASIO agent could also face a decade in prison under the new laws, a tenfold increase in the existing maximum penalty.
Attorney-General George Brandis said in a "newly dangerous age" it was vital that those protecting Australia were equipped with the powers and capabilities they needed.
The bill will now be sent to the House of Representatives, where passage is all but guaranteed.
The legislation addresses a number of recommendations of a bipartisan joint parliamentary inquiry into Australia's national security laws.
It allows ASIO to access third party computers and apply one warrant to multiple devices.
After concerns were raised by Labor and Liberal Democratic Senator David Leyonhjelm, the government agreed to amend the legislation to specifically rule out ASIO using torture.
"ASIO cannot, does not and has never engaged in torture," Senator Brandis said.
The Palmer United Party was successful in amending the law so anyone who exposes an undercover ASIO operative could face up to 10 years behind bars instead of one.
The Australian Greens voted against the bill, slamming the new measures as extreme and a "relentless expansion of powers" of the surveillance state.
Senator Leyonhjelm and Independent Senator Nick Xenophon - who moved a number of unsuccessful amendments - also opposed the legislation.
The legal changes come amid growing concern over Islamic State (IS) extremists in the Middle East and terror threats at home.
IS has ordered followers to directly target civilian Australians.
In less than a week, police in two states launched the biggest terror raids in Australia's history, and shot dead a known terror suspect after he stabbed two officers in Melbourne.
A second suite of anti-terror laws targeting foreign fighters was introduced on Wednesday and will be debated next month.
These changes have opposition support and would make it a criminal office to travel to a terrorist hot-spot without a reasonable excuse.
The government is aware of about 60 Australians fighting in Syria and Iraq.
A third bill enabling the collection of metadata will be introduced later this year.