Brazil's Congress on Tuesday passed comprehensive legislation on Internet privacy in what some have likened to a web-user's bill of rights, after stunning revelations its own president was targeted by US cyber-snooping.
The lower House of Deputies had passed the bill earlier, and late Tuesday the Senate gave it a green light. That leaves only the expected signature into law from President Dilma Rousseff.
"The bill sets out principles, guarantees, rights, and duties for Internet users, and Internet service providers" in Brazil, a statement on the Senate's website said.
The law is aimed at balancing freedom of expression and the web-users' rights to privacy and protection of personal data, Rousseff says.
Still, Brazilian authorities do not control what happens outside their country; the government-backed law stopped short of requiring companies such as Google and Facebook to store local users' data in Brazilian data centers.
Rousseff has spoken out forcefully against cyber-snooping revealed by US intelligence whistleblower Edward Snowden. The US eavesdropping targeted her staff's communications and those of others at Petrobras, the state oil giant.
US National Security Agency snooping so infuriated her that she canceled a state visit to Washington scheduled for October in protest, and pushed for a UN resolution aimed at protecting "online" human rights.
The trove of documents leaked by Snowden—who now lives in Russia—sparked outrage in the United States and abroad about the vast capabilities of America's intelligence programs.
Following the revelations, US President Barack Obama was forced to propose changes to the electronic surveillance of US citizens, including proposals put forward in March to take bulk phone data collection out of the hands of the NSA.
Explore further: Brazil's Congress approves internet legislation (Update)