Laurence H. Tribe is the Carl M. Loeb University Professor and Professor of Constitutional Law at Harvard. Joshua A. Geltzer is executive director and visiting professor of law at Georgetown’s Institute for Constitutional Advocacy and Protection.

On Tuesday, President Trump claimed — on Twitter, no less — that Twitter is “stifling FREE SPEECH,” thus suggesting that Twitter is violating the First Amendment. As usual, Trump is wrong on the law, but this time he’s even more wrong than usual. There is someone violating the First Amendment on Twitter, but it’s not Twitter — it’s Trump. What’s more, his threat on Wednesday to shut down Twitter altogether would mean violating the First Amendment in new ways.

Trump is utterly mistaken in claiming that Twitter is violating the First Amendment — or even that Twitter can violate the First Amendment. Prompting Trump’s outburst was the platform’s first-ever attachment of warnings to two of Trump’s tweets encouraging users to “get the facts about mail-in ballots.” Clicking the warning leads to a news story indicating that “Trump makes unsubstantiated claim that mail-in ballots will lead to voter fraud.” Attaching these warnings, Trump claimed, was Twitter’s First Amendment sin.

But it’s no constitutional violation. To begin with, the First Amendment applies to the government — not to private actors like Twitter. So, when the company adds warnings to tweets or even — going a step further for users other than Trump — removes tweets, it can’t possibly violate the First Amendment, because it simply isn’t a governmental entity. You can love or hate how Twitter is regulating its own private platform — but you can’t call it a First Amendment violation.

Furthermore, when Twitter attaches a warning to a tweet, that constitutes speech of Twitter’s own, which is generally protected under the First Amendment from governmental censorship. Far from violating the First Amendment by speaking on top of Trump’s own speech, Twitter was exercising its First Amendment rights.

Here’s the irony: While Twitter isn’t using its platform to violate the First Amendment, Trump is. That’s not just our view; it’s what a federal appeals court held in a landmark decision last year. The court ruled that Trump was violating the First Amendment by blocking on Twitter those whose views he disliked. It is long-standing constitutional law that, when a government actor such as Trump creates a public forum in which different views are encouraged to be shared, the government can’t then pick and choose which voices to permit and which to silence. That’s what the court found Trump did, holding that, having used his @realDonaldTrump Twitter account as an official governmental public forum, Trump couldn’t then selectively censor his critics.

But it isn’t just that Trump is already committing the very violation of which he’s accusing Twitter: Astonishingly, Trump is now raising the possibility of aggravating his First Amendment offense by adding another. Apparently so outraged by Twitter’s accurately questioning his inaccurate tweets, Trump denounced social media platforms that “totally silence conservative voices” and threatened to “strongly regulate, or close them down.”

For Trump to do so would be an obvious First Amendment violation of its own. No matter what one thinks of Twitter, operating a social media platform that hosts a wide array of speech is, itself, a form of expression protected under the First Amendment. Just as Trump can’t shut down a newspaper because he doesn’t like one of its articles, he can’t close down Twitter — let alone all of social media — because he doesn’t like a warning affixed to a couple of his tweets.

Some of Trump’s congressional allies are echoing his threat in ways that also misapprehend the relevant law. Florida Sen. Marco Rubio took to Twitter to say that if social media companies exercise some “editorial role like a publisher,” they should no longer receive the protections from liability afforded them under federal law.

Rubio fundamentally misunderstands the law and, in particular, Section 230 of the Communications Decency Act. Section 230 was passed precisely to provide social media companies with the flexibility to regulate content on their platforms responsibly, even as they played a very different role from that of traditional publishers because social media companies don’t scrutinize content before it is uploaded to their platforms.

In other words, Section 230 was meant to incentivize companies like Twitter to do exactly what the company just did in experimenting with a new way of moderating Trump’s relentlessly false tweets. There are thoughtful arguments for and against Section 230 in its current form, but it makes no sense to suggest that social media platforms should lose Section 230’s protections for exercising the type of content moderation that the provision was intended to facilitate.

All told, Trump is doubly wrong in his assault on Twitter. Whatever one thinks of how the company is handling the president, there is simply no legal basis for how he is handling Twitter.

Watch Opinion videos:

Read more: