A shadowy group based in Russia spent at least $100,000 on adverts on Facebook in an attempt to influence last year's US presidential election, the social network said.

In a small number of cases the adverts named one of the candidates, Donald Trump or Hillary Clinton, but most instead promoted divisive messages on issues like immigration, race, gay rights,and gun rights.

The operation lasted two years and involved at least 3,000 individual adverts bought at key times in the campaign.

Facebook said it was cooperating with inquiries by Congress into whether Russia sought to influence the election.

The purchased adverts were linked to 470 accounts and pages that Facebook said were "inauthentic" and has now suspended.

Alex Stamos, Facebook’s chief security officer, said the accounts were connected to each other and "likely operated out of Russia".

Around a quarter of the adverts were targeted at specific geographic areas.

Many of them ran in 2015 before the first primary elections in the race for the Republican and Democrat nominations.

Mr Stamos said Facebook had also discovered an additional $50,000 was spent on around 2,200 ads "that might have originated in Russia".

The amounts were small in comparison to those spent on digital advertising by presidential candidates.