Facebook in order to make its platform safer for users has shut down 652 pages, accounts and groups it identified as part of coordinated disinformation campaigns that originated in Iran.

Facebook also found a number of new pages connected to Russia.

The Iran-linked pages and groups spread misinformation in the United States, United Kingdom, Latin America and the Middle East.

Some of them posed as a group called “Liberty Front Press.”

Facebook revealed that the coordinated campaigns originating in Iran included 254 Facebook pages and 116 Instagram accounts that amassed more than 1 million followers across the two services.

According to the social media giant, those behind the pages spent more than $12,000 on advertisements between 2012 and 2017.

Facebook, Twitter (TWTR) and other social media companies have been scrambling to protect their platforms ahead of the US midterm elections in November and prevent a repeat of the widespread disinformation seen during the 2016 presidential campaign.

Facebook CEO Mark Zuckerberg said the company’s attempts to identify fake pages, groups and accounts are making the social network safer.

“While it’s still early, we’re starting to see it pay off and we’re identifying more of this before the election,” he said.

In a related development, Twitter announced on Tuesday that it has identified and removed 284 accounts, many of which it linked to Iran, for “coordinated manipulation.”

The announcements underlines how aggressively foreign actors are still seeking to covertly influence political conversations in countries around the world.

Facebook’s revelation came after Microsoft (MSFTtook control of websites it said Russian military intelligence could have tried to use to hack American politicians.