SAN FRANCISCO — A federal judge on Wednesday dismissed a $50 million lawsuit filed by Representative Tulsi Gabbard, a Democratic presidential candidate, that accused Google of infringing on her free speech when it briefly suspended her advertising account last year.

The judge, Stephen V. Wilson of the U.S. District Court for the Central District of California, granted Google’s motion to dismiss the lawsuit because the Gabbard campaign had failed to prove that the First Amendment clause that prohibits the government from curbing free speech applied to Google as a private company.

The Gabbard campaign’s lawsuit failed to establish “how Google’s regulation of its own platform is in any way equivalent to a governmental regulation of an election,” Judge Wilson wrote in his order.

Ms. Gabbard, a congressional representative from Hawaii, is still a candidate for the Democratic nomination but has failed to garner any significant support in the early votes or national polls. She did, however, win her first delegate on Tuesday, from American Samoa. Officials with the Gabbard campaign did not immediately respond to requests for comment Wednesday evening.