WASHINGTON — A trove of Facebook ads made public Wednesday by Congress depicts Russia’s extraordinary cyberintrusion into American life in 2016 aimed at upending the nation’s democratic debate and fomenting discord over such disparate issues as immigration, gun control, and politics.

The ads, seen by vast numbers of people, encouraged street demonstrations against Donald Trump and Hillary Clinton and fostered support and opposition to Bernie Sanders, Muslims, gays, black people, and the icons of the Civil Rights movement.

The few dozen ads, a small sampling of the approximately 3,000 Russian-connected ones that Facebook has identified and turned over to Congress, were released amid two consecutive days of tough and sometimes caustic questioning by House and Senate lawmakers about why social media giants hadn’t done more to combat Russian interference on their sites.

Advertisement

The ads underscore how foreign agents sought to sow confusion, anger, and discord among Americans through messages on hot-button topics. US intelligence services say the Russian use of social media was part of a broad effort to sway the 2016 presidential election in favor of Trump. Special counsel Robert Mueller is investigating whether the Kremlin worked with the Trump campaign to influence voters.

Get This Week in Politics in your inbox:

A weekly recap of the top political stories from The Globe, sent right to your email.

Many of the ads show careful targeting, with messages geared toward particular audiences. One ad, aimed at those with an interest in civil rights and their leaders, highlights a man who claims to be Bill Clinton’s illegitimate son. Another video parodying Trump was targeted at black people who also are interested in BlackNews.com, HuffPost Politics or HuffPost Black Voices. It was shown 716 times and got 42 clicks.

Though officials at Facebook and other social media giants were initially reluctant to acknowledge Russian success on their sites in swaying popular opinion, company leaders have struck a different tone in recent weeks and disclosed steps to Congress intended to prevent future meddling by foreign agents.

In preparation for hearings this week, Facebook disclosed that content generated by a Russian group, the Internet Research Agency, potentially reached as many as 126 million users. Company executives said that going forward they would verify political ad buyers in federal elections, requiring them to reveal correct names and locations. The site will also create new graphics where users can click on the ads and find out more about who’s behind them.

But that did not prevent hours of questioning during two days of hearings, with lawmakers expressing exasperation at the seeming inability to thwart foreign intervention.

Advertisement

At one point, Senator Al Franken shook his head after he couldn’t get all the companies to commit to not accepting political ads bought with foreign currency. Several ads touting Facebook pages called ‘‘Back the Badge,’’ “Being Patriotic,’’ “Blacktivist,’’ “South United,’’ and ‘‘Woke Blacks’’ were labeled as being paid for in rubles using Qiwi, a Moscow-based payment provider that aims to serve ‘‘the new generation in Russia’’ and former Soviet republics, according to the company’s website.

‘‘Google has all knowledge that man has ever developed,’’ the Minnesota Democrat said. ‘‘You can’t put together rubles with a political ad and go like, ‘Hmmm, those data points spell out something pretty bad?’ ”

Besides the ads released by lawmakers on the House intelligence committee, Democrats on the panel also released four tweets from RT, a Russian state-sponsored television network, and nearly 3,000 Twitter handles active during the final months of the election campaign.

Taken together, they show how actual news events and stories helped shape surreptitious Russian messaging.

One advertisement cited a real October 2016 news story — about a gunman’s battle with Boston police officers — then used it to attack Hillary Clinton as ‘‘the main hardliner against cops’’ and to promote Trump as the candidate who can ‘‘defend the police from terrorists.’’ It received 761 clicks.

Advertisement

Three of the tweets referenced Clinton, including one that linked to an RT story about the release of a batch of hacked e-mails from her campaign chairman, John Podesta. Another featured a video of Clinton falling while getting into a van. ‘‘What impact will this stumble have on #Hillary’s campaign?’’ it read.

Some 34,000 Trump supporters were shown an ad calling for Clinton’s removal from the ballot, citing ‘‘dynastic succession of the Clinton family’’ as a breach of core principles laid out by the Founding Fathers. Clicking on it took Facebook users to a petition at WhiteHouse.gov. Another, seen by more than 15,000 people and getting some 1,300 clicks, equated Clinton with Barack Obama’s ‘‘anti-police and anti-constitutional propaganda.’’

Though US intelligence officials believe the social media effort was aimed at aiding Trump, there are other indications it was intended to sow general divisions.

One ad promoted a Nov. 12 anti-Trump rally in New York City, titled ‘‘Not My President.’’ Large anti-Trump rallies actually did take place around the country that day in major American cities. That doesn’t mean the Russian accounts planned the events, but rather that they were piggybacking on existing protests and promoting them to like-minded people.

Not all of Russia’s activity was intended to intervene in the election, said Salve Regina University professor James Ludes, who has written on Russia’s influence on the United States.

The ads on divisive issues such as race and gun ownership — or even organizing opposing rallies across the street from each other — are meant to ‘‘attack political cohesion’’ and make Americans turn against one another, he said.

‘‘It’s not intended to benefit once candidate or another per se, but raise political temperature,’’ Ludes said. ‘‘Make us feel like we are coming apart at the seams.’’