In an age where major public policies are announced and debated through platforms like Facebook and Twitter, the courts are increasingly barring public officials from limiting people’s access to social media.

In late July, a Virginia judge ruled that public officials do not have the right to block people who disagree with their views from an official Facebook page. A legal challenge also has been brought by people blocked from the president’s @realDonaldTrump Twitter feed.

And in August, the American Civil Liberties Union of Maine sued on behalf two residents who claim the governor violated their First Amendment rights by blocking them from posting on his “Paul LePage, Maine’s Governor” Facebook page.

In the Virginia case, resident Brian Davison sued Loudoun County Board Chairwoman Phyllis Randall for blocking access to her Facebook page after he posted allegations that school board members and their families had possible conflicts of interest. The block lasted only a few hours, before Randall reconsidered, but even that was deemed unacceptable.

“Defendant’s actions, while relatively inconsequential as a practical matter, did in fact violate plaintiff’s right of free speech under the First Amendment to the United States Constitution and … the Constitution of Virginia,” wrote Judge James Cacheris for the U.S. District Court in Alexandria.

The judge noted that Randall’s Facebook page listed her official county contact information and that she had asked constituents to use the page to convey their thoughts about county business. It was not, he concluded, “merely a personal website that she may do with as she pleases.”

In the Trump Twitter case filed July 11, eight plaintiffs including the Knight First Amendment Institute alleged that the president violated the Constitution by excluding people who disagree with him from his Twitter feed.

“President Trump’s Twitter account, @realDonaldTrump, has become an important source of news and information about the government, and an important public forum for speech by, to, and about the President,” the suit states.

Tom Kamenick, deputy counsel for the Wisconsin Institute for Law and Liberty, a nonprofit that promotes individual freedom, said experts disagree about whether the @realDonaldTrump Twitter account would fall under the First Amendment.

“Simply because a public official maintains a social media account does not make it an official government account,” said Kamenick, who serves on the Wisconsin Freedom of Information Council.

Whether it is an official account could depend on the account’s name, the types of messages posted on it and whether government resources are used to maintain it, Kamenick said. But if it’s an official account, he said, “the government cannot engage in viewpoint discrimination by blocking users or deleting comments for expressing a particular opinion.”

Scot Ross, executive director of the liberal advocacy group One Wisconsin Now, said that is exactly what is happening with his organization. The group is blocked from the official accounts of Republican state Reps. Jesse Kremer (@repjessekremer), Robin Vos (@repvos) and John Nygren (@rep89) as well as the account of Milwaukee County Sheriff David Clarke, he said.

“They oppose our views and have all blocked us in what we believe is a violation of both the First Amendment and the state’s open record laws,” Ross said.

Facebook and Twitter are fast becoming the new town squares. Officials should not be allowed to wall them off.