This article originally appeared on VICE US.

Dozens of governments around the world are weaponizing social media to subvert democratic elections and spy on their own citizens, a new report reveals.

The latest edition of Freedom House’s Freedom on the Net report shows that rather than acting as a vector for more transparency and open elections, the internet is being used to undermine the democratic process.

“Governments and populist movements are using social media to manipulate elections on a grand scale, and governments are using technology to monitor their own citizens on an unprecedented scale,” Mike Abramowitz, president of Freedom House, told reporters on Monday.

This is the ninth consecutive year that internet freedom has declined, according to the data collected by Freedom House, a non-profit advocacy group that is funded by the U.S. government.

There are two main reasons for the decline: more online election interference and more government surveillance — both of which are leveraging the power of social media.

Today, almost three billion people are under surveillance by governments and law enforcement, in part because monitoring technology is getting more advanced and more affordable, the report finds.

"Governments are using social media to collect and analyze vast amounts of personal data on entire populations,” Abramowitz said. “Many employ artificial intelligence to identify potential threats and silence opposition. As this monitoring technology has become less expensive, a growing number of law enforcement agencies are using mass surveillance with little oversight or accountability.”

The report looks at internet freedom in 65 countries around the world, covering 87 percent of the world’s internet users. For the fourth consecutive year, China was the world’s worst abuser of internet freedom, while Iceland was its best protector.

In the U.S., internet freedom declined for the third year in a row thanks to the increased surveillance of social media by law enforcement, and immigration officials’ monitoring of people crossing the southern border.

Documents published earlier this year revealed that the Immigration and Customs Enforcement (ICE) was monitoring the social media use of participants in anti-Trump protests in New York City during the summer of 2018.

"Agents of the Department of Homeland Security have used social media monitoring tools to scrutinize Americans’ constitutionally-protected activities not only when crossing the Mexico border, but also in the context of peaceful protests on the administration's policies on immigration and other topics,” Adrian Shahbaz, one of the report’s authors, told reporters.

Another disturbing development revealed in the report: the increasing use of online disinformation in democracies. Online disinformation campaigns have been around for years, but the report shows that they are no longer the preserve of dictatorships.

“What is most alarming is how populist leaders and far-right groups have grown adept not only at creating viral disinformation but also at harnessing networks that disseminate it,” Abramowitz.

Shahbaz highlighted Brazil’s 2018 general election, in which authoritarian leader Jair Bolsonaro successfully harnessed the power of online platforms to secure the presidency.

“Just as consultants in the U.S. stole data from Facebook to develop psychological profiles of millions of Americans three years ago, political operatives in Brazil scraped phone numbers from social networks and automatically added voters to specially created WhatsApp groups, according to location, gender, and income levels,” Shabaz said. “These groups provided the perfect petri dish for a new type of unscrupulous electioneering.”

There were similar issues in India and the Philippines, and in Myanmar Facebook was accused of helping the military carry out a genocide.

But Abramowitz pointed out that despite the overall decline, there have been some bright spots too.

“There have been some striking examples of technology fuelling positive democratic change,” Abramowitz said, pointing to Lebanon, Algeria, and Hong Kong, where activists are using the internet and smartphones to hold “corrupt and inept politicians” accountable to the people.

The report recommends several ways to address the disinformation campaigns and social media surveillance.

Among the suggestions is to “ensure political advertisements are transparent and adhere to strict content standards.” While Twitter has banned all political ads, Facebook says that it is not going to fact-check the contents of the political ads that run on its platform.

But the report warns that without governments and private companies working together to solve this problem, it is only going to get worse, particularly with advances in technologies like 5G, biometrics, and artificial intelligence around the corner.

“Strong protections for democratic freedoms are necessary to ensure that the internet does not become a Trojan horse for tyranny and oppression,” the report says. “The future of privacy, free expression, and democratic governance rest on the decisions we make today.”