Twitter accounts linked to Russian agents sought to draw attention away from President Trump's crude comments to "Access Hollywood" late in last year's campaign and focus criticism on the mainstream media and Hillary Clinton, according to an analysis by The Associated Press.

After The Washington Post released a 2005 recording of Trump boasting about groping and kissing women without their permission, Russian-backed Twitter accounts promoted the release of hacked emails from Clinton's campaign chairman, John Podesta, and criticized the media for reporting on the so-called "Access Hollywood" tapes, the analysis shows.

"MSM (the mainstream media) is at it again with Billy Bush recording ... What about telling Americans how Hillary defended a rapist and later laughed at his victim?" one account, "America_1st-," tweeted at the time, according to the AP.

According to the AP, Russian accounts were active earlier in the campaign, as well. Some echoed Trump's false claim that then-President Obama was not born in the United States.

After Trump reversed course on that claim, some of the Russian-linked accounts repeated the real estate mogul's claim that it was Clinton who first made the allegations about Obama's birthplace.

Russia's role in the 2016 election - including how social media accounts were used to sway public opinion against Clinton - has been the subject of ongoing congressional investigations and a criminal probe by special counsel Robert Mueller. Those investigations are also examining possible coordination between the Trump campaign and Moscow.

Trump has repeatedly denied any collusion or improper contacts between his campaign and Russia, and has called the investigations into the matter a "witch hunt."

Twitter turned over 382 Russian-backed accounts to lawmakers last week. Those accounts have since been deactivated and their tweets have been deleted.

Russia's efforts to use social media to meddle in the 2016 presidential election went beyond Twitter.

Facebook revealed earlier this year that Russian operatives purchased some 3,000 advertisements on Facebook. Those ads sought to play to social and political divisions in the U.S., targeting issues such as race, religion and immigration.