Facebook said 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 banned accounts and Facebook sites exhibited "coordinated inauthentic behavior" such as working 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.