And in the weeks leading up to the introduction of the Klobuchar-Warner-McCain bill, Facebook told congressional aides that it is too difficult to figure out if an ad is political or commercial because candidates are often changing messages and topics. The company added that with the sheer number of ads on the site, the engineering involved in identifying political ads would be extremely challenging.

When the Federal Election Commission moved to strengthen its online disclaimer requirements in 2011 and again last year, the companies either ignored requests for input or suggested that new rules could “stand in the way of innovation,” as Facebook asserted in a 2011 comment to the commission.

Around that time, both companies paid Perkins Coie to seek exemptions from the election commission to one of the few election rules that do apply to online political activity — that political ads placed on third-party websites contain disclaimers revealing who paid for them. The exemption requests, written by Mr. Elias, the head of Perkins Coie’s political law practice, argued that it was impractical to require disclaimers on ads the size of those then being offered on Google and Facebook.

While the election commission approved Google’s request, which was submitted in 2010, by a 4-to-2 vote, it deadlocked 3 to 3 on Facebook’s request, which was submitted the next year. Facebook nonetheless proceeded as if it was exempt from the disclaimer requirement, declining to mandate that political advertisements on its platform list their sponsors.

Such disclaimers and other disclosure requirements might have helped deter the Russian-funded ads and other online efforts to meddle in the election, say advocates for stricter campaign finance rules. Mr. Elias went on to help lead research into Russian efforts to help Donald J. Trump and damage Mrs. Clinton during the 2016 presidential campaign.

It was “kind of like the chickens coming home to roost,” said Ms. Ravel, the former commissioner.

She argued that since Facebook was not granted an exemption to the disclaimer requirements, it should have required advertisements to include disclaimers for the past half-dozen years. But referring to Mr. Elias, she said that “the savvy political insiders understand that there is not going to be any enforcement from the F.E.C.” because the commission has frequently deadlocked along partisan lines over enforcement matters in recent years.

Mr. Elias rejected suggestions that he helped Russia hurt Mrs. Clinton.

“Russia found a number of ways to aid Donald Trump and hurt Hillary Clinton, and the F.E.C. disclaimers would not have stopped them,” he said. The ads in question would not have required the disclaimers, he said, because — according to Facebook — they did not explicitly mention Mr. Trump, Mrs. Clinton or the election. In a blog post, Facebook wrote that the ads focused on amplifying “divisive social and political messages across the ideological spectrum, touching on topics from L.G.B.T. matters to race issues to immigration to gun rights.”