Mr Trump's favourite social media platform is a public forum and therefore blocking Americans who wish to use it to reply to the president violates their constitutional right to free speech, Judge Naomi Buchwald of the southern district court of NY said.
The claimants argued their First Amendment (free speech) rights "have been and will continue to be encumbered and the ability to communicate has been and will be limited because of each individual plaintiff's personal ownership of a Twitter account that was blocked". "The answer to both questions is no", she concluded.
The case came after a number of individuals brought a case against Trump after he blocked them for posting critical messages about him.
Buchwald said that their inability to reply to Trump's tweets after being blocked amounted to a violation of their First Amendment rights. On behalf of seven of them, The Knight Institute filed a lawsuit a year ago claiming that Trump was distorting debate by preventing followers of his account from expressing their views. But blocking someone also works in the other direction: if Trump blocks another user, that user can't see Trump's tweets and (as a consequence) can't reply to them.
The Department of Justice has indicated that it disagrees and is considering what to do next.
The judge's ruling is a landmark one as there are few laws governing interaction in the social media space.
This case is one of the first to tackle the thorny issues raised by the new technology, and Judge Buchwald's ruling applies to all public officials who use their accounts to disseminate information relevant to the public interest.
Europe moves to protect its firms working in Iran from USA sanctions
Trump's Iran decision is part of a broader pattern of actions that have deeply frustrated America's European allies. The so-called "blocking statute" was introduced in 1996 to circumvent USA sanctions on Cuba but was never used.
"The more important social media becomes to the public discourse, the more important it becomes to defend First Amendment rights on social media", DeCell said.
Trump's lawyers and the White House director of social networks, Daniel Scavino, said the president had a right to decide who had access to his private twitter account.
While she said the President should "remedy the blocking", Judge Buchwald stopped short of directly ordering Mr Trump to unblock users. "If that's the case, the government doesn't get to pick and choose who is allowed in".
Twitter, which wasn't a party to the lawsuit, declined to comment. She said the First Amendment protects people even from trivial harm. The Trump administration has not decided yet whether Trump will unblock his critics on Twitter as directed by Buchwald or whether it will appeal the ruling, the New York Times reported.
The government did not dispute that Mr. Trump blocked people because of those kinds of antagonistic tweets.
The fact that Trump chose to block users instead suggests that his goal was to prevent them from communicating with others.
"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.