President Donald Trump has made directing scorn on Twitter a defining feature of his presidency. But when the animus is leveled back at him, the nation’s leader has a habit of silencing those critics by blocking them.

Now a federal judge says Trump has to face the heat, ruling the president and his staff blocking anyone on Twitter is unconstitutional because the platform amounts to a “public forum.”

U.S. District Judge Naomi Reice Buchwald in Manhattan handed down the ruling Wednesday in response to a lawsuit brought by the Knight First Amendment Institute at Columbia University last July on behalf of seven Twitter users who were blocked by Trump after replying unfavorably to his tweets.

Buchwald said that their inability to reply to Trump’s tweets after being blocked amounted to a violation of their First Amendment rights.

She disagreed with the government’s assertion that the blocked Twitter users’ right to free speech does not apply in this case because Trump was acting as a private individual through his @realDonaldTrump account.

“This case requires us to consider whether a public official may, consistent with the First Amendment, ‘block’ a person from his Twitter account in response to the political views that person has expressed, and whether the analysis differs because that public official is the president of the United States,” Buchwald said. “The answer to both questions is no.”

The White House did not respond to a request for comment.

The Justice Department said in an emailed statement that it would fight the ruling.

“We respectfully disagree with the court’s decision and are considering our next steps,” a spokesperson said.

Jameel Jaffer, the Knight Institute’s executive director, said the ruling broke some new ground for how the First Amendment is applied to digital space.

“We’re pleased with the court’s decision, which reflects a careful application of core First Amendment principles to government censorship on a new communications platform,” Jaffer said in a prepared statement. “The president’s practice of blocking critics on Twitter is pernicious and unconstitutional, and we hope this ruling will bring it to an end.”

Buchwald said Trump could opt to mute his critics instead. The feature prevents selected accounts from appearing in a user’s Twitter mentions _ effectively blocking them from Trump’s view. Muted users could still appear for others to see under Trump’s tweets, however.

“Muting equally vindicates the president’s right to ignore certain speakers and to selectively amplify the voices of certain others but _ unlike blocking _ does so without restricting the right of the ignored to speak,” Buchwald said.

The distinction between muting and blocking showed the judge applied a subtle, but sophisticated, understanding of Twitter and social media, said Aaron Caplan, a professor at Loyola Law School of Los Angeles specializing in constitutional law.

“The judge wrote a very careful opinion,” Caplan said. “The most important part was she really understood how the technology works.”

It’s unclear how many people have been blocked by Trump. Scores of users identify themselves as such with the hashtag #BlockedByTrump. They include people from all walks of life, including high school students and bloggers.

The controversy stems from Trump’s embrace of the platform as his soapbox to attack his critics, laud his supporters and announce administration policies.

The judge’s ruling noted that Trump has used his personal account, which has 52.2 million followers, to announce that the U.S. military would not accept or allow transgender individuals to serve, that he intended to nominate Christopher Wray to head the FBI, and that he was firing Secretary of State Rex Tillerson and Secretary of Veterans Affairs David Shulkin.

The National Archives and Records Administration has also determined that tweets from @realDonaldTrump are official records.

The Justice Department has argued that Trump was acting in a personal capacity by blocking critics who often used “intentionally inflammatory language.”

“The President, like other public officials, routinely engages in conduct that is not state action, whether that might be giving a toast at a wedding or giving a speech at a fundraiser,” the Justice Department wrote in a brief, according to The Washington Post.

Caplan, who agreed with Buchwald’s ruling, said government officials can’t choose to listen solely to their supporters.

“You have a government official saying, ‘Here is a space where people can talk and respond, but I want to censor people I don’t like,’” he said. “When a government official does that, it raises a constitutional problem.”

Buchwald declined to order an injunction to force Trump to unblock the users, explaining that the ruling alone should compel the president to end the practice.

“A declaratory judgment should be sufficient, as no government official _ including the president _ is above the law, and all government officials are presumed to follow the law,” she said.

The ruling applies to Trump and Dan Scavino, the White House’s social media director.