The country had planned legislation asking foreign Internet companies to store data of Brazilians locally

Brazil's lawmakers have agreed to withdraw a provision in a proposed Internet law, which would have required foreign Internet companies to host data of Brazilians in the country.

The provision was backed by the government in the wake of reports last year of spying by the U.S. National Security Agency, including on communications by the country's President Dilma Rousseff.

The legislation, known as the "Marco Civil da Internet," will be modified to remove the requirement for foreign companies to hold data in data centers in Brazil, according to a report on a website of the Brazilian parliament.

U.S. Internet companies have protested strongly against the provision in the proposed Brazilian legislation.

Following reports of U.S. surveillance programs, some governments like Brazil are taking measures to limit the flow of information over the Internet between their country and the U.S., Richard Salgado, director for law enforcement and information security at Google, told the U.S. Senate Judiciary Subcommittee on Privacy, Technology and the Law, in written testimony last year.

Companies like Google, which do not comply with the proposed Brazilian rules, could be barred from doing business in a very important market or have to pay "hundreds of millions of dollars in fines," Salgado said.

The Information Technology Industry Council, an advocacy and policy organization for technology companies, said in February that the new rules could "balkanize" the Internet. Local data storage requirements could lead other countries to follow Brazil and apply the policies reciprocally, wrote Maria Medrano, director for global policy at ITI.

"Not only are mandates for in-country data storage contrary to the global and decentralized nature of the Internet, they also do not provide added privacy or security," she added.

The proposed legislation is expected to be voted by Brazil's lawmakers by Tuesday.

While exempting Internet companies from setting up data centers locally, the new rules will reportedly require Internet companies providing services in Brazil to be bound by local laws.

John Ribeiro covers outsourcing and general technology breaking news from India for The IDG News Service. Follow John on Twitter at @Johnribeiro. John's e-mail address is john_ribeiro@idg.com