NEW YORK—A federal judge ruled Wednesday that President Donald Trump is violating the First Amendment when he blocks critics on Twitter because of their political views.

U.S. District Judge Naomi Reice Buchwald in Manhattan stopped short in her written decision of ordering Trump or a subordinate to stop the practice of blocking critics from viewing his Twitter account, saying it was enough to point out that it was unconstitutional.

“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 as has been declared,” Buchwald wrote.

The judge did not issue an order against Trump, and the plaintiffs did not ask for one. But in cases like this, plaintiffs can, in theory, go back and ask for such an order, and if it is not obeyed, the violator can be held in contempt.

Buchwald said she rejected the assertion that an injunction can never be lodged against the president but “nonetheless conclude that it is unnecessary to enter that legal thicket at this time.”

The case was brought last July by the Knight First Amendment Institute at Columbia University and seven individuals blocked by Trump after criticizing the Republican president.

Kerri Kupec, a spokeswoman for the Department of Justice, said in an email: “We respectfully disagree with the court’s decision and are considering our next steps.”

Jameel Jaffer, the Knight Institute’s executive director, said in a release that his organization was pleased.

“The president’s practice of blocking critics on Twitter is pernicious and unconstitutional, and we hope this ruling will bring it to an end,” he said.

The lawsuit was filed after Trump blocked some individuals from @realDonaldTrump, a 9-year-old Twitter account with over 50 million followers, after each of them tweeted a message critical of Trump or his policies in reply to a tweet he had sent.

Justice Department lawyers had argued it was Trump’s prerogative to block followers, no different from the president deciding in a room filled with people not to listen to some.

Buchwald ruled that the tweets were “governmental in nature.”

“The President presents the @realDonaldTrump account as being a presidential account as opposed to a personal account and, more importantly, uses the account to take actions that can be taken only by the President as President,” the judge said.

The judge noted that another defendant, Daniel Scavino — the White House’s social media director and an assistant to the president — can unblock those followers without the president needing to do it himself. The judge dismissed Sarah Huckabee Sanders as a defendant in the case after it was established she does not have access to Trump’s account.

Buchwald also said she recognized the impact on the individuals by Trump’s action was not “of the highest magnitude.” She said the First Amendment protects people even from trivial harm.

After a hearing this year, the judge had suggested that Trump mute rather than block some of his critics. At the time, a Justice Department attorney agreed that muting would enable Trump to avoid a tweet he doesn’t want to read.

Twitter users can block people, which prevents them from seeing the user’s feed while logged in. Or they can mute the person, which keeps the user from seeing that person’s tweets and reply messages in their feed.

Your support is crucial…

With an uncertain future and a new administration casting doubt on press freedoms, the danger is clear: The truth is at risk.

Now is the time to give. Your tax-deductible support allows us to dig deeper, delivering fearless investigative reporting and analysis that exposes what’s really happening — without compromise.

During this holiday season, stand with our courageous journalists. Donate today to protect a free press, uphold democracy and ensure the stories that matter are told.

SUPPORT TRUTHDIG