(Bloomberg) -- In Brazil’s widening campaign against disinformation, the Senate passed draft legislation to rein in on fake news that’s set to clash with President Jair Bolsonaro and Internet privacy activists.

The bill was approved by senators late on Tuesday. It now heads to the lower house, where it has good chances of passing with “with some changes and a wider reach,” Speaker Rodrigo Maia said in an interview.

The proposal imposes strict messaging rules and data-storage requirements on social media companies. Some of the most controversial elements of the text call on popular platforms to track widely shared messages and bar fake accounts created or used “for the purpose of assuming or simulating the identity of third parties to deceive the public.”

“The draft represents a milestone in identifying and preventing harmful and criminal lies on the Internet,” Senator Rodrigo Pacheco said in an interview. “Brazil is losing the battle against fake news and needs this law.”The proposed legislation comes as Brazilian authorities pursue multiple investigations into influential businesspeople and bloggers for allegedly orchestrating online smear campaigns against Bolsonaro’s opponents. At the heart of the bill are measures to crack down on the use of anonymous accounts and bots, which have proliferated during the president’s rapid rise to power.

Read More: In Hunt for ‘Office of Hate,’ Brazil’s Supreme Court Closes In

The probes have ensnared key Bolsonaro allies and drawn the president’s ire at a time his enemies say his handling of the Covid-19 pandemic is causing a public health disaster in Brazil. On Wednesday, he labeled the legislation as an assault on free speech and threatened to veto the bill if it makes it to his desk.

“No one is criticized on the Internet more than me and I never complained,” Bolsonaro said in an online broadcast from his official residence.

Lawmakers have been grappling with how and when to combat the spread of fake news since Brazil’s largest daily, Folha de S. Paulo, reported that during the 2018 presidential election Bolsonaro allies had hired online influencers and digital marketing firms to send bulk social-media messages to dominate the political conversation. The revelation sparked subsequent probes in the Supreme Court, Congress and Brazil’s electoral authority.

Censorship Fears

In May, the Supreme Court ordered federal police to raid dozens of properties and seize computers, smartphones and bank records of influential Bolsonaro allies. The judge leading the investigation said he saw evidence of the existence of a “criminal association” dedicated to mass dissemination of fake news.

Despite the proliferation of offensive content on social media networks, legal scholars warn the draft bill’s text is too vague in determining what constitutes disinformation and allows for online censorship and tracking of Internet habits of regular Brazilians.“This new bill would require a lot more data gathering and it creates provisions for more surveillance,” said Carlos Affonso Souza, director of The Institute for Technology and Society in Rio de Janeiro. He called the proposal a “step backward” in Internet privacy.

Among the provisions that seek to keep tabs on messages and content that goes viral, are requirements that social media companies have a physical presence in Brazil and store for three months messages that have been forwarded by five or more users.

©2020 Bloomberg L.P.