President Donald Trump cannot block users on his Twitter feed, a federal judge in New York City ruled Wednesday.

Judge Naomi Reice Buchwald said in her ruling that Trump is violating the U.S. Constitution by preventing certain Americans from viewing his tweets on @realDonaldTrump.

The social media platform, Buchwald said, is a "designated public forum" from which Trump cannot exclude individual plaintiffs. She rejected an argument by the Justice Department that the president had a right to block Twitter followers because of his "associational freedoms."

The judge's ruling was in response to a lawsuit filed last July by the Knight First Amendment Institute at Columbia University, as well as seven other plaintiffs whom Trump had personally blocked from following him.

The plaintiffs included a journalist who had tweeted at Trump that "Russian won" the presidential election for him, a surgeon and a Texas police officer.

One plaintiff told CNBC that she is aware of at least 150 verified Twitter users who have been blocked by the president and that there are at least hundreds more unverified accounts that Trump has blocked.

The blocks on the social media platform prevented the plaintiffs from viewing or responding to the president's tweets when logged into their own Twitter accounts. Trump is an avid Twitter user and routinely makes news, often several times in a single day, with his posts.

Tweet

The president has more than 52.2 million Twitter followers and has tweeted more than 37,600 times since signing up for Twitter in March 2009.

"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 said in her opinion.

"The answer to both questions is no."

Read the judge's full ruling on Trump's Twitter blocking here

The White House did not immediately respond to CNBC's request for comment on Buchwald's ruling.

A Justice Department spokesman said, "We respectfully disagree with the court's decision and are considering our next steps." The Justice Department has 60 days to appeal the ruling.

The Knight Institute's executive director, Jameel Jaffer, said in a prepared statement: "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 added: "The President's practice of blocking critics on Twitter is pernicious and unconstitutional, and we hope this ruling will bring it to an end."

Katie Fallow, a senior staff attorney at the institute, said, "The First Amendment prohibits government officials from suppressing speech on the basis of viewpoint ... The court's application of that principle here should guide all of the public officials who are communicating with their constituents through social media."

Holly Figueroa O'Reilly, one of the plaintiffs in the suit, believes she was blocked by Trump last year after posting a GIF showing Pope Francis giving the president a "side-eye" glance and tweeting it Trump saying "This is pretty much how the whole world sees you."

Tweet

She told CNBC, "He just arbitrarily blocks people because he doesn't like being criticized."

"I'm pretty happy about the" ruling, said the 47-year-old Seattle resident, who describes herself as a "political hack."

"I think the best thing for Trump to do is just to unblock everyone," and not appeal Buchwald's decision, O'Reilly said.

But she was skeptical the president would do that.

"His history isn't, 'Oh, I lost, I'm going to capitulate.' His history is, 'I lost, f--- you, I'm going to punch back.' "

O'Reilly said that she was not seeking to be unblocked to read "stupid tweets" by Trump, but instead to read more consequential ones by the president, and to have her responses to him visible to other people.

"I just want to know when we're going to war," she said. "That's my thing."

Read Judge Buchwald's order below: