WASHINGTON — A group of Twitter users blocked by President Trump sued him and two top White House aides on Tuesday, arguing that his account amounts to a public forum that he, as a government official, cannot bar people from.

The blocked Twitter users, represented by the Knight First Amendment Institute at Columbia University, raised cutting-edge issues about how the Constitution applies to the social media era. They say Mr. Trump cannot bar people from engaging with his account because they expressed opinions he did not like, such as mocking or criticizing him.

“The @realDonaldTrump account is a kind of digital town hall in which the president and his aides use the tweet function to communicate news and information to the public, and members of the public use the reply function to respond to the president and his aides and exchange views with one another,” the lawsuit said.

By blocking people from reading his tweets, or from viewing and replying to message chains based on them, Mr. Trump is violating their First Amendment rights because they expressed views he did not like, the lawsuit argued.

It offered several theories to back that notion. They included arguments that Mr. Trump was imposing an unconstitutional restriction on the plaintiffs’ ability to participate in a designated public forum, get access to statements the government had otherwise made available to the public and petition the government for “redress of grievances.”

Filed in Federal District Court for the Southern District of New York, the lawsuit also names Sean Spicer, the White House press secretary, and Dan Scavino, Mr. Trump’s director of social media, as defendants. It seeks a declaration that Mr. Trump’s blocking of the plaintiffs was unconstitutional, an injunction requiring him to unblock them and prohibiting him from blocking others for the views they express, and legal fees.

The Knight First Amendment Institute, directed by Jameel Jaffer, also joined the lawsuit as a plaintiff although its Twitter account had not been blocked by Mr. Trump. It argued that it had a First Amendment right to hear from people who had been blocked and are barred from participating in the “forum” of message chains based on his postings.

The lawsuit was foreshadowed last month by a letter the Knight First Amendment Institute sent to Mr. Trump on behalf of two of the now-plaintiffs asking him to unblock their accounts, but the White House did not do so.

News of the letter, and the novel legal arguments it advanced, touched off a debate among legal specialists, with some supporting the idea and others expressing skepticism. The skeptics argued, among other things, that Mr. Trump’s account was personal, not official; that he had the same right to block people he considered trolls as anyone else; and that the injury to blocked people was minor since they could still view his postings as long as they did not log in to Twitter under their own accounts.

The Knight First Amendment Institute sought to address and rebut such critiques in a lengthy blog posting later last month, and its complaint noted that since its letter, the Trump White House has taken several steps suggesting that the administration considers his Twitter account to be an official channel.

For example, Mr. Trump announced his nomination of Christopher A. Wray as F.B.I. director on Twitter, and the White House sent a letter to the Senate Intelligence Committee pointing to Mr. Trump’s denial on Twitter that he had taped his conversations with the former F.B.I. director, James B. Comey, as an answer to the panel’s questions about that matter.

“My use of social media is not Presidential — it’s MODERN DAY PRESIDENTIAL,” Mr. Trump tweeted on July 1.

Also since the early June letter, the Supreme Court unanimously ruled that a North Carolina law barring convicted sex offenders from using Twitter or Facebook violated the First Amendment.

Justice Anthony M. Kennedy, writing for a five-justice majority, said the law violated the First Amendment because social media had become “the modern-day public square.” Justice Samuel A. Alito Jr., joined by two other justices, concurred with the result but expressed reservations that Justice Kennedy’s language was too sweeping and loose.

Since then, several other blocked users from around the country have joined the effort. They include Rebecca Buckwalter, a fellow at the liberal Center for American Progress, whose account was blocked after she responded to a tweet by Mr. Trump on June 6 in which he disparaged the “fake news” media and said he would not have won the election if he relied on it.

She replied, “To be fair you didn’t win the WH: Russia won it for you” — and she was blocked by Mr. Trump’s account.