Facebook said it disrupted an international fake account operation that was firing off inauthentic "likes" and bogus comments to win friends it would then pound with spam.
Facebook's security team spent six months fighting to neutralise what they saw as a coordinated campaign, according to Shabnam Shaik, a company security manager.
"Our systems were able to identify a large portion of this illegitimate activity -- and to remove a substantial number of inauthentic likes," Shaik said in a blog post.
"By disrupting the campaign now, we expect that we will prevent this network of spammers from reaching its end goal of sending inauthentic material to large numbers of people."
The ring used accounts in a number of countries, including Bangladesh, Indonesia and Saudi Arabia.
The group tried to mask its activities with such tactics as connecting with the social network through "proxy" servers to disguise where "likes," posts or other communications were originating, according to Shaik.
Facebook said the campaign aimed to trick people into connecting as friends they would later target with spam. The company said it had derailed the operation early enough to spare users that fate.
The leading social network this week said it has started weeding out bogus accounts by watching for suspicious behaviour, such as repetitive posts or torrents of messages.
The security improvement was described as being part of a broader effort to rid the leading social network of hoaxes, misinformation and fake news by verifying people's identities.
"We've found that when people represent themselves on Facebook the same way they do in real life, they act responsibly," Shaik said.
"Fake accounts don't follow this pattern, and are closely related to the creation and spread of spam."
Under pressure to stymie the spread of fake news, Facebook has taken a series of steps including making it easier to report such posts and harder to earn money from them.
Subscribe to Arabian Business' newsletter to receive the latest breaking news and business stories in Dubai,the UAE and the GCC straight to your inbox.