When longshot presidential candidate Tulsi Gabbard sued Google last year alleging a violation of her First Amendment rights, legal experts were scathing in their responses.

The lawsuit "has so many problems it's hard to know where to begin," tweeted attorney Gabriel Malor. Santa Clara University law professor Eric Goldman described the lawsuit as "terrible."

Now a federal judge has confirmed these experts' views. In a Tuesday ruling, he threw out the lawsuit. Gabbard's lawsuit claimed that Google violated her free speech rights when it blocked her from buying campaign ads for a few hours on the evening of June 28, 2019. But Stephen Wilson, a federal district judge in the central district of California, ruled that Gabbard didn't have a case.

Gabbard accused Google of violating her rights under the First Amendment. But the First Amendment prohibits the government, not private companies, from abridging people's free speech rights. Google is not a government agency, so the First Amendment simply doesn't apply.

Gabbard's lawyers countered that Google should be treated like a government agency. Google regulates political ads on its platforms, which gives the company a lot of influence over the electoral process. In Gabbard's view, that meant that Google was exercising a government-like role over the electoral process and hence should be bound by the First Amendment.

Judge Wilson didn't buy it.

"Google does not hold primaries, it does not select candidates, and it does not prevent anyone from running for office or voting in elections," Wilson wrote. "To the extent Google regulates anything, it regulates its own private speech and platform."

Suing technology giants—especially Google—has become an increasingly popular tactic among politicians and pundits in recent years. Last month, a federal appeals court in California rejected a similar lawsuit from conservative pundit Dennis Prager. Alt-right social media platform Gab unsuccessfully sued Google in 2017. Last year a federal court rejected a lawsuit against Google by conservative legal group Freedom Watch.

Last year Rep. Devin Nunes (R-Calif.) filed a lawsuit against Twitter, accusing the social media giant of defamation for hosting a satirical Twitter account called Devin Nunes' cow.