A federal judge in San Francisco on Friday dismissed former President Donald Trump's lawsuit against Twitter over the social media company's decision to bar him from its platform permanently after the Jan. 6 attack at the U.S. Capitol.

The judge, James Donato of U.S. District Court for the Northern District of California, wrote that he was not convinced that Twitter had infringed on Trump's free speech rights when it shut down his account Jan. 8, 2021, two days after a mob spurred by Trump's "stop the steal" lies stormed the Capitol in hopes of overturning the presidential election results.

At the time, the tech giant said that Trump had violated its rules against glorifying violence with a pair of tweets, including one praising his supporters as "patriots." The decision stripped Trump of his favorite megaphone: He had used Twitter to lob insults and grievances and had amassed more than 88 million followers.

In his lawsuit against Twitter, Trump had asserted that the San Francisco-based company had been pandering to liberal Democrats by barring him from its platform and had sought to silence contradictory viewpoints.

In mounting a First Amendment claim, Trump had argued that Twitter was effectively functioning like the government. But Donato was unconvinced, saying that Trump's claim that Twitter had behaved like a state actor was unsubstantiated.

"The amended complaint merely offers a grab-bag of allegations to the effect that some Democratic members of Congress wanted Mr. Trump, and 'the views he espoused,' to be banned from Twitter because such 'content and views' were "contrary to those legislators' preferred points of view," Donato wrote.

A Twitter spokesperson declined to comment about the ruling. A spokesperson for Trump did not immediately respond to a request for comment.

Five people whose Twitter accounts were permanently suspended had joined Trump as plaintiffs in the lawsuit, along with the American Conservative Union. They argued that the bans amounted to censorship.

The ruling came a little more than a week after Elon Musk, the world's richest man, struck a deal to buy Twitter for about $44 billion.

The acquisition by Musk, CEO of Tesla and founder of SpaceX, prompted speculation about whether Musk would seek to change the platform's guidelines for posting and potentially clear a path for Trump to return. Some Republicans have expressed quiet reservations about a possible Trump return, worrying that he could distract from the party's messaging before the midterm elections.

While many Republicans cheered Musk's planned takeover of the tech giant, Trump told Fox News last month that he would stick with posting on his own social network, Truth Social, a fledgling platform that has endured early struggles. "I am not going on Twitter," he said, but he added that he hoped "Elon buys Twitter, because he'll make improvements to it."

This article originally appeared in The New York Times.