Ahead of a two-day Net Mundial international conference in Sao Paulo on the future of the Internet, Brazil's Senate has unanimously adopted a bill which guarantees online privacy of Brazilian users and enshrines equal access to the global network.

The bill known as the "Internet constitution" or Marco Civil was first introduced in the wake of the NSA spying scandal and has now been signed into law by President Dilma Rousseff – one of the primary targets of the US intelligence apparatus, as leaks by former NSA analyst Edward Snowden revealed.

Rousseff presented the law on Wednesday at a global Net Mundial Internet conference in Sao Paulo.

The bill promotes freedom of information, making service providers not liable for content published by their users, but instead forcing the companies to obey court orders to remove any offensive material.

The principle of neutrality, calling on providers to grant equal access to service without charging higher rates for greater bandwidth use is also promoted. The legislation also limits the gathering and use of metadata on Internet users in Brazil.

Approval of the Senate was assured after the government dropped a provision in the legislature requiring Internet companies such as Twitter and Facebook to store data on Brazilian users at home.

The final version bill states that companies collecting data on Brazilian accounts must obey Brazilian data protection laws even if the data is collected and stored on servers abroad.

The demand of the use of Brazilian data centers had been added to the legislation last year after Snowden's leaks reveal the extent of NSA's spying network and wiretapping of President Dilma Rousseff communications.

NSA was also involved on spying on Brazil's strategic business sector, particularly on a state-run oil company Petrobras. In response to US spying, Rousseff canceled a state visit to Washington in October and called on UN, together with Germany, to adopt a UN resolution guaranteeing internet freedoms.

The adoption of the bill was a top priority for the Brazilian leader as a two-day Net Mundial conference opened in Brazil on Wednesday.

The aim of the global event on internet governance is to discuss cyber security amid the NSA spying scandal. Safeguarding privacy and freedom of expression on the Internet are among the topics to be discussed according to a draft agenda.

US officials attended the meeting alongside representatives from dozens of other states.

“All of them should have equal participation in this multi stakeholder process,” Virgilio Almeida, Brazil's secretary for IT policy, who will chair the conference, told Reuters.

As part of the discussion, Russia and China have submitted a proposal jointly with Tajikistan and Uzbekistan asking for the UN to develop a code of conduct for the Internet.

“Most participants here want a multi stakeholder model for the Internet,” Almeida told Reuters. “China wants a treaty at the United Nations, but only governments are represented there.”

The event is not expected to result in any binding policy decisions, but Almeida said it wii facilitate a debate that will “sow the seeds” for future reforms of internet governance.