President Donald Trump arrives for a bill signing ceremony in the South Court Auditorium on the White House campus, Wednesday, May 30, 2018, in Washington. (AP Photo/Evan Vucci)

The US Justice Department has said it will appeal a federal judge's ruling that President Donald Trump cannot legally block Twitter users who disagree with him.

The appeal notice, filed Monday before the US appellate court in New York, refers to the original May 23 ruling by federal district Judge Naomi Reice Buchwald.

She ruled that the blocking of Trump critics violated the free speech rights of those users guaranteed in the Constitution's First Amendment.

The president's @realDonaldTrump account has more than 52 million followers and is his favorite public communication tool, in the face of what he calls "fake news" media which publish investigative articles about him and his administration.

Buchwald's ruling came in response to a lawsuit filed by the Knight First Amendment Institute, which is based at Columbia University in New York and works to defend free speech.

The case was filed in the name of seven individual plaintiffs who said they were blocked from the @realDonaldTrump account after posting tweets critical of his policies.

Although they were still able to see the tweets without logging in to Twitter, and to quote Trump's tweets in their own messages, their comments were excluded from the threads that make up a public "conversation" involving the president and his Twitter followers.

After Buchwald's ruling, the White House unblocked the plaintiffs' Twitter accounts, their lawyer Jameel Jaffer said.

One of them, Maryland sociology professor Philip Cohen, was blocked in June 2017, 15 minutes after he reacted to a Trump tweet by accusing him of being "Corrupt Incompetent Authoritarian."

"We whined. We complained. We sued. We won our First Amendment lawsuit in federal court. And now @realDonaldTrump has unblocked me. Wow!," Cohen tweeted on Monday.

The Knight Institute said "many others are still blocked."