Facebook said Thursday that it has purged more than 800 U.S. pages and accounts for spamming users with politically-tinged garbage links and clickbait just weeks ahead of the U.S. midterm elections.

The social media giant said the accounts “have consistently broken our rules against spam and coordinated inauthentic behavior,” according to The Wall Street Journal.

The banned accounts and Facebook sites worked together to make the pages appear more popular than they actually are. This, Facebook said, was designed to mislead users about who they are and what they’re doing.

The social network said these accounts spread “sensational political content” designed to drive people to ad-laden websites outside Facebook. In the past, such spammers have often focused on celebrity gossip, weight loss remedies and fake iPhones.

Pages Facebook removed fell on both sides on the political spectrum, Facebook said, although it declined to say if there were more on the right or the left. The removed pages included the conservative “Nation in Distress” and the left-wing “Snowflakes,” among others with names such as “Reasonable People Unite,” ”The Resistance” and “Right Wing News.”

Facebook said it doesn’t look at the content of the posts and photos that the accounts are spreading, but rather, the “behavior” of the pages — such as whether they are using fake accounts or sending spam — when deciding whether to remove them.

The turn toward politics suggests that spammers are learning from the Russian playbook on how to get people riled up and clicking. Facebook has been working to weed out misinformation and election meddling since it acknowledged that Russian agents abused its service in 2016.

But while those actors seemed intent on disrupting elections, Facebook says its latest purge was about accounts trying to make money.

The New York Times reported that influence campaigns are increasingly a domestic phenomenon fomented by Americans on the left and the right.

“There are now well-developed networks of Americans targeting other Americans with purposefully designed manipulations,” said Molly McKew, an information warfare researcher at the New Media Frontier, a firm that studies social media.

Politics has always involved shadings of the truth via whisper campaigns, direct-mail operations and negative ads bordering on untrue. What is different this time is how domestic sites are emulating the Russian strategy of 2016 by aggressively creating networks of Facebook pages and accounts — many of them fake — that make it appear as if the ideas they are promoting enjoy widespread popularity, researchers said. The activity is also happening on Twitter, they said.

The shift toward domestic disinformation raises potential free speech issues when Facebook and Twitter find and curtail such accounts that originate in the United States, an issue that may be sensitive before the midterms. “These networks are trying to manipulate people by manufacturing consensus — that’s crossing the line over free speech,” said Ryan Fox, a co-founder of New Knowledge, a firm that tracks disinformation.

This month, Twitter took down a network of 50 accounts that it said were being run by Americans posing as Republican state lawmakers. Twitter said the accounts were geared toward voters in all 50 states.