The Brazilian Internet Bill of Rights, called the Marco Civil and signed by president Dilma Rousseff in Sao Paulo, guarantees net neutrality, regulates government surveillance on the Internet, and places limits on data companies can collect from Brazilian customers. In addition, Internet service providers won’t be held liable for content published by their customers and will be legally required to remove offensive material via court order. The legislation’s signing took place at a global Internet governance conference, NETMundial, in front of executives from Google and several other firms.

Rousseff said, in an officially translated copy of her speech, that “The Marco Civil guarantees net neutrality, a fundamental principle for maintaining the free and open nature of the Internet. The new Marco Civil establishes that telecommunications companies must treat any and all data packages equally, and also forbids the blocking, monitoring, filtering, or analysis of the content of such packages. Our model for the Marco Civil can now influence the global debate on the path to ensuring real rights in the virtual world.”

Brazil’s decision to enact legislation guaranteeing a free and relatively surveillance-free Internet stands at sharp odds with prevailing trends in the United States. Alongside the ongoing revelations of intelligence agencies vacuuming up mass metadata records on domestic digital life, the U.S. effectively killed net neutrality this month. In a proposal last Wednesday, the Federal Communications Commission paved the way for broadband providers like Verizon and Comcast to demand large companies like Netflix and Google/YouTube sign agreements to get preferential online access for their services.

One observer, Danny O’Brien of the Electronic Frontier Foundation, took issue with Marco Civil provisions that demand Brazilian Internet service providers retain data on their users for a fixed period. “(It is) a document that emphasized and reinforced human rights at its core, yet mandated a level of compulsory private data collection upon Brazilian citizens, even as Europe’s highest court was rejecting similar EU legislation as being an explicit violation of human rights,” O’Brien wrote in a blog post.

With the legislation signed, Brazil is one of the only countries in the world to offer citizens a digital bill of rights. Similar laws exist in Costa Rica, Estonia, Finland, and France.