Colin Stretch (L), General Counsel of Facebook, Sean Edgett (C), Acting General Counsel of Twitter, and Richard Salgado (R), Director of Law Enforcement And Information Security of Google, are sworn in prior to testifying during a US Senate Judiciary Subcommittee on Crime and Terrorism hearing on Russian influence on social networks on Capitol Hill in Washington, DC, October 31, 2017.

When Sen. Josh Hawley, R-Mo., introduced legislation last month aimed at major technology companies, a near-endless parade of groups quickly voiced disapproval.

There was plenty of pushback from tech advocacy groups.

TechFreedom, a tech-focused Washington nonprofit, said the proposal would "set up a partisan bloodmatch" between big companies and regulators. The Electronic Frontier Foundation, a tech-focused civil liberties nonprofit, said it would "let the government decide who speaks." Engine Advocacy, an organization that advocates for policies that help startups, said the legislation, "in an effort to address a nonexistent problem" would "dismantle the sensible regulatory regime that is responsible for the development of the Internet." The Computer & Communications Industry Association said the bill would set up "government censorship of online speech" and limit freedom.

Those concerns were echoed by a litany of conservative and libertarian-leaning think tanks. Libertarian think tank R Street said the legislation "hurts conservatives" while the Competitive Enterprise Institute, another conservative think tank, said it was "highly regulatory and should be rejected." The Cato Institute and the American Enterprise Institute also came out against the bill.

Every one of those think tanks and advocacy groups is backed by Google, Facebook or both. The companies are not only two of the main targets of Hawley's bill, but they're also the focus of broader political scrutiny that now spans both parties and has spilled over into the Democratic presidential race.

With lawmakers ramping up debate over privacy, antitrust and, in Hawley's case, legal protections the platforms rely on, the Silicon Valley giants are unleashing some of the Washington power they've spent the past few years building up, going from a low-key player into the biggest spender in D.C.

And while tech-funded think tanks and advocacy groups have fought other initiatives, the fervor over Hawley's bill has revealed just how well powerful companies have laid the foundation in Washington to fight efforts to rein them in.

"I've never seen pushback in such a fashion before," Terry Schilling, executive director of the American Principles Project, a conservative think tank, told NBC News. "Even with net neutrality, these groups were all over the place — even though Facebook and Google supported it. It's safe to say that it's largely due to pressure from the social media giants that hasn't been seen before."

In recent years — after relatively little interaction between Silicon Valley and Capitol Hill — Google and Facebook have ramped up their spending on lobbying, with both companies spending more on such services in 2018 than in any year prior, data from the Center for Responsive Politics showed.

Alphabet, Google's parent company, spent more on federal lobbying than any other company in 2018 at more than $21.7 million. Facebook spent almost $13 million. That does not include money those companies have spent bolstering think tanks and other Washington influencers, who help shape discussion about policies that affect those companies.

Of course, that comes as the tech giants face calls to be broken up from politicians including Massachusetts Sen. Elizabeth Warren, a Democratic presidential contender, and amid a broader bipartisan push for more stringent regulations and intense scrutiny in Capitol Hill hearings.

"Corporate funded groups are always engaged in issues like this; have done so for many years," Jeffrey Chester, executive director of the nonprofit Center for Digital Democracy, said. "But clearly the stakes are higher now, because we have never ever had a time when serious regulation (privacy, antitrust) is on the agenda. And bipartisan. So [last month's] reaction shows there are five-alarm bells ringing in D.C. from Google and Facebook that have galvanized the groups they support."

The connection goes as follows: Google provides, in its own terms, "substantial funding" to R Street, the Electronic Frontier Foundation, Engine Advocacy, the Computer & Communications Industry Association, TechFreedom, the Cato Institute, and AEI. Those organizations also receive funding from a variety of other corporate benefactors.

Google, in addition to Facebook, also backs the Competitive Enterprise Institute, while Facebook has provided backing to the State Policy Network, of which Americans for Prosperity — another group that came out against he bill — is a member.

An Americans for Prosperity spokesperson said that the group provides funding to the State Policy Network, but that it does not receive funding from the State Policy Network, which receives money from Facebook.

Earlier this year, Wired reported on how Google specifically influences Washington, noting that experts aligned with the company's viewpoints "frame populist fervor to regulate Big Tech as the work of unserious 'hipster antitrust' activists who don't understand the law, and argue that consumers are better off with the status quo."

"Scholars and experts may hold these positions independent of financial incentives from tech companies like Google, but both regulators and the public are sometimes left in the dark about potential conflicts of interest," Wired added.

CEI, in a statement to NBC News, said its response to Hawley's bill was in-line with its advocacy against government regulation for more than three decades.

"We have consistently fought against both regulations that would lead to government censorship, like the proposal floated by Mark Zuckerberg earlier this year, and this misguided attempt by Senator Hawley to curtail First Amendment rights by compelling speech," Travis Burk, a CEI spokesperson, said.

"We take a principled stand in favor of free speech and against politicians picking winners and losers," Jesse Blumenthal, director of technology and innovation for Stand Together, an umbrella organization that encompasses Americans for Prosperity, LIBRE, Concerned Veterans for America, and the Charles Koch Institute, told NBC News in a statement. "Senator Hawley's Section 230 bill was widely rejected because government-imposed efforts to stop speech are an affront to our most basic American values."

Google and Facebook did not respond to requests for comment.

Hawley's bill is hardly without opposition from non-tech sources.

A first-term senator who has made battling big tech core to his brand, Hawley proposed the Ending Support for Internet Censorship Act, which would make big tech platforms liable for content posted by their users unless they can earn immunity through Federal Trade Commission audits that prove they're "politically neutral" when it comes to their algorithms and content-removal practices. The legislation would alter protections enjoyed by tech platforms under Section 230 of the 1996 Communications Decency Act.

Critics of all stripes have said that if those protections were to change, the internet "would probably be decimated overnight" and that changes to the law could create the opposite effect, causing platforms to purge many more users.

"Senator Hawley has written a bill to deputize the federal government as the Speech Police in flagrant violation of the First Amendment," Sen. Ron Wyden, D-Ore., and a major player in the passage of the Communications Decency Act, said in a statement.

Meanwhile, the Internet Association — a lobbying group that includes Google and Facebook as members but advocates on industrywide issues and counts many tech companies in its fold — issued a strong rebuke of the proposal, indicating the totality of the tech objection to the proposal.

Matt Stoller, a fellow at the Open Markets Institute who focuses on monopoly power, said that the last time he "saw this kind of collective temper tantrum by all their trade groups was" during the legislative battle over a pair of bills aimed at curtailing sex trafficking online, which altered Section 230 to remove liability protection for sites that "knowingly" publish any material pertaining to sex trafficking.

But, unlike Hawley's bill — which Stoller says he does not support — much of that backlash was joined by grassroots activism from sex workers, advocates and survivors of sex trafficking.

On the Hawley bill, Schilling said: "It's a very tough case to make that the Facebook and Google money don't play a factor in such a strong and united pushback on this issue."

CORRECTION (July 3, 2019, 4:51 p.m. ET): A previous version of this article misstated the relationship between Americans for Prosperity and the State Policy Network. Americans for Prosperity is a member of the State Policy Network but does not receive funding from the group or from Facebook.