A court in New York on Wednesday ruled that United States President Donald Trump cannot block Twitter users from viewing his online profile on the basis of their political beliefs, reported The Guardian. District Judge Naomi Reice Buchwald said it would be a violation of the right to free speech.

The lawsuit against Trump and White House officials was filed by The Knight First Amendment Institute at Columbia University on behalf of seven Twitter users who were blocked by the president for criticising him online. Trump has more than 52 million followers on Twitter.

“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,” the judge said, according to BBC. “The answer to both questions is no.”

Trump could face legal action if he did not comply with the ruling and unblock his critics. “Because all government officials are presumed to follow the law once the judiciary has said what the law is, we must assume that the president [and his social media director] will remedy the blocking we have held to be unconstitutional,” said the judge.