Three senators are putting pressure on internet giants like Facebook and Google to be more transparent about who is buying political ads on their sites in the wake of revelations that Russian-linked operatives placed ads on social media networks to sow division in the runup to the 2016 election.

On Thursday, Republican Sen. John McCain announced he is joining Democratic Sens. Amy Klobuchar and Mark Warner to co-sponsor the Honest Ads Act, which would require political ads sold on the internet to follow the same rules as ones sold on television, radio, and satellite networks, all of which have to disclose who is buying political advertising.

“In the wake of Russia’s attack on the 2016 election, it is more important than ever to strengthen our defenses against foreign interference in our elections,” McCain said in a statement. “Unfortunately, US laws requiring transparency in political campaigns have not kept pace with rapid advances in technology, allowing our adversaries to take advantage of these loopholes to deceive millions of American voters with impunity.”

The announcement is a response to Russia’s meddling in the last presidential election, senators said. It’s illegal for foreign entities to buy political ads in the US, but in the runup to the 2016 election, a Russian-backed “troll farm” purchased $100,000 worth of political ads on Facebook. The ads only came to light last month, when Facebook officials testified in front of Congress.

Russian meddling in the election is usually framed as an issue of national security: A foreign power was able to interfere with the election process in the US. But the legislation looks at it another way — through the lens of campaign finance. The 2002 Bipartisan Campaign Reform Act, a campaign finance law sponsored by McCain and Sen. Russ Feingold, banned foreign actors from buying political ads in the United States. The Honest Ads Act would amend the law to include internet ads in those requirements.

“Political ads on the Internet are more popular now than ever,” Klobuchar wrote in an op-ed on the bill in the Washington Post. “But there is little transparency and accountability when it comes to disclosing information about these ads. And without transparency, there is no ability to know if foreign governments are purchasing the ads. This leaves our election system vulnerable to foreign influence.”

Campaign finance laws don’t apply online — so Russia could buy ads on Facebook and Google

The 2002 McCain-Feingold legislation was an attempt to inject transparency into political advertising, and part of a broader effort to cut down on attack ads. The law put limits on so-called “soft money,” how much political parties and interest groups could spend. But one of its most recognizable impacts was that political candidates had to provide a voiceover at the end of their ads, saying, “I am [insert candidate name here], and I approve this message.”

The ultimate goal was to give voters more information about the groups putting political ads on television, radio, and satellite networks.

But by the current law, internet companies don’t have to play by the same rules, because the law was written before the internet became the main way people communicate about politics. In 2006, the Federal Election Commission decided the internet could be exempt from these rules, after pressure from bloggers concerned about free speech.

In its decision, the FEC wrote that the internet was “a unique and evolving mode of mass communication and political speech that is distinct from other media in a manner that warrants a restrained regulatory approach.”

By 2017, a majority of American adults — 67 percent — got their news through social media, according to a study last month from the Pew Research Center. Facebook is a key news source; 45 percent primarily get their news from the social network, making it an important place for candidates, campaigns, and political parties to advertise during national and state elections.

The lack of transparency online made it easy for Russian influence to go undetected during the busy 2016 campaign season. Besides the $100,000 the Russians spent on Facebook ads, Google recently revealed that Russian operatives bought “tens of thousands of dollars” in ads on YouTube, Gmail, and other platforms before the election.

In the past, social media companies have resisted these kinds of rules. The $100,000 in Russian ad spending on Facebook is dwarfed by the more than $1 billion total spent on digital political ads during the 2016 campaign. In 2011, Facebook asked the FEC to apply something known as the “small item” exemption to political ads on their website, arguing that because they had limited ad space, there wasn’t enough room to include a disclosure saying who paid for the ad. Ultimately, the FEC never issued a decision, leaving Facebook free to do what it wanted.

Framing disclosure rules as a way to fight foreign influence might make that resistance more difficult, but tech companies are unlikely to accept it passively — as the New York Times’s Kenneth Vogel and Cecilia Kang reported, they’re assembling their own team of lobbyists and lawyers to try to shape the legislation as much as possible.

Political ads were part of a widespread Russian effort to influence the election

Russian interference in the 2016 election took on many forms, just one of which was political advertising. So far, Facebook seems to be where Russian-linked operatives spent the most money on political ads. The Russians spent about $100,000 on Facebook ads, compared to the “tens of thousands” they spent on ads at Google.

It appears that two different entities linked to the Russian government placed ads on Facebook and Google, meaning that the effort could have been more widespread than previously believed. Some of the ads were for specific candidates, including Donald Trump, Bernie Sanders, and the Green Party’s Jill Stein, but many highlighted politically divisive issues, including race relations, LGBTQ rights, immigration, and gun control.

For example, some ads took advantage of divisive social issues in America, promoting activist groups like Black Lives Matter, while other Russian ads suggested Black Lives Matter was a threat, according to the Washington Post. Other ads tried to stoke religious fears, saying that Muslim women had voted for Democratic candidate Hillary Clinton.

The Russians deployed many other tactics, including recruiting US activists to stage protests for the civil rights of black Americans, according to an investigation by the Russian news site RBC. They also created thousands of fake accounts on Facebook and Twitter that linked back to their own websites, filled with hacked material on Hillary Clinton and prominent Democrats like businessman and investor George Soros, a New York Times investigation found.

It is unclear how successful the so-called Russian “troll farm” on Facebook was. Many of the accounts were crudely designed and used stilted, awkward language, and many of their posts were not widely shared throughout social media. The majority of the posts ran in 2015, the year before the election, when Hillary Clinton and Donald Trump were still competing with other candidates in the primaries, the Times investigation found.

Facebook recently announced that it is taking new steps to crack down on fake accounts, saying it wouldn’t allow pages to advertise on its site if they repeatedly posted fake content, and that it has been increasingly monitoring and shutting down the fake accounts.