Facebook has taken down 652 pages, accounts and groups it identified as part of coordinated disinformation campaigns that originated in Iran and targeted countries around the world. It 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 (FB) said 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. Those behind the pages spent more than $12,000 on advertisements between 2012 and 2017, the company said.

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 on a call with reporters.

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 company said it is working with law enforcement and other tech firms.

The announcements underscore just how aggressively foreign actors are still seeking to covertly influence political conversations in countries around the world. Facebook's revelation came after Microsoft (MSFT) took control of websites it said Russian military intelligence could have tried to use to hack American politicians.

Facebook made the announcement Tuesday evening. The company said it had taken action after discovering "coordinated inauthentic behavior" by actors seeking to "mislead others about who they were and what they were doing."

One part of the Liberty Front Press network claimed to be an independent Iranian media organization but was in fact linked to Press TV, a news network affiliated with Iranian state media, Facebook said.

Some of the pages were identified by Facebook after a tip from cybersecurity firm FireEye.

"This influence operation linked to Iran aims to promote political narratives in line with Iranian interests, including anti-Saudi, anti-Israeli, and pro-Palestinian themes," FireEye analyst Lee Foster said. "The activity we have uncovered is significant and demonstrates that actors beyond Russia continue to engage in online, social media-driven influence operations as a means of shaping political discourse."

FireEye noted that the Iran-linked activity it uncovered "does not appear to have been designed as a dedicated attempt to influence the 2018 US midterm elections."

"This does not preclude such attempts being made, however, and the recent reorientation of some social media accounts to adopting left-leaning identities may indicate an opportunistic shift toward a more elaborate effort to influence US domestic political discourse," it added.

Some of the content Facebook removed could be traced to groups previously connected to the GRU, Russia's primary military intelligence agency. Special counsel Robert Mueller indicted 12 members of the GRU last month, accusing them of hacking the US Democratic Party.

Facebook said that the latest Russian accounts, groups and pages it took down were not related to the ones originating in Iran, and that they did not appear to have targeted the United States. "This more recent activity focused on politics in Syria and Ukraine," it said.

Facebook is working with US law enforcement in an ongoing investigation. It said it has been following suspect pages for months.

Using clues like website registrations and IP addresses, Facebook connected Liberty Front Press pages to Iranian state media. The first Liberty Front Press accounts Facebook found were created in 2013.

Another set of suspicious accounts and pages that originated in Iran could be traced to 2011.

The announcement comes amid Facebook's attempts to prevent a repeat of 2016, when the platform was peppered with accounts connected to a Kremlin-linked troll group posing as Americans. It removed more than 30 pages last month that it said were part of a coordinated campaign to post "misleading" information. Facebook told lawmakers it suspected a Russian group was behind the accounts, which were involved in organizing political events in the United States.

Tuesday's revelations show the problem goes beyond Russia.

"I've been saying for months that there's no way the problem of social media manipulation is limited to a single troll farm in St. Petersburg, and that fact is now beyond a doubt," said Senator Mark Warner, top Democrat on the Senate Intelligence Committee. "We also learned today that the Iranians are now following the Kremlin's playbook from 2016."