The day before she was sworn in to public office, Phyllis J. Randall created a Facebook page and encouraged citizens to share criticism and compliments. A month later, Randall deleted what she deemed a “slanderous” accusation delivered anonymously and aimed at someone other than her.

She blocked the commenter from her page.

The ban was brief, no more than 12 hours. But the fallout sparked a novel federal case that has implications for how President Trump manages his active Twitter account and for his millions of followers.

Randall, a Loudoun County Democrat and the first African American woman elected to lead a county board of supervisors in Virginia, has little in common with the president. She has criticized Trump as “the school bully we warn our children about” and called him “not fit for office.” But both elected officials have been sued for silencing critics on social media. In separate court filings, they contend that their accounts on privately owned digital platforms are personal and that they can restrict who gets a chance to speak there.

Government officials throughout the country are learning to navigate what free speech advocates describe as the digital equivalent of traditional town hall meetings. Maryland’s governor, Larry Hogan (R), reached a settlement with the American Civil Liberties Union after he blocked hundreds of people from his Facebook page. D.C. Police Chief Peter Newsham appeared to run afoul of the city’s social media policy when he blocked followers from his personal Twitter account for what he called “cruel and nasty” posts.

In Virginia, the Richmond-based federal appeals court is on track to become the first to answer the question of whether First Amendment protections prevent public officials from closing off their social media feeds.

The case against Trump is in early stages at the federal appeals court in New York, where he is represented by the Justice Department. “The @realDonaldTrump account is neither owned nor controlled by the federal government; it belongs to Donald Trump in his personal capacity,” agency lawyers said in court filings. The president’s use of the “block function” is “merely an exercise of his personal, not governmental, authority to exclude individuals from that private account.”

But free speech advocates behind the two lawsuits say blocking critical comments or followers is the equivalent of an elected official closing the door on constituents at a public meeting.

“You don’t want public officials picking and choosing who is allowed to speak,” said attorney Katherine Fallow of the Knight First Amendment Institute at Columbia University, who is handling the cases in Virginia and New York. “You want to make sure all voices are heard in that forum so you see a fair and true representation of what people think, rather than an echo chamber.”

District Court judges in Virginia and New York ruled against Randall and the president, saying their actions violated the First Amendment.

President Trump's Twitter feed. (J. David Ake/AP)

A judge in a third case in Kentucky sided with Gov. Matt Bevin (R), who has blocked Twitter and Facebook followers.

The Supreme Court has yet to take on the issue but has acknowledged the increasing importance of social media in public debate.

“While in the past there may have been difficulty in identifying the most important places (in a spatial sense) for the exchange of views, today the answer is clear. It is cyberspace — the ‘vast democratic forums of the Internet’ in general, and social media in particular,” Justice Anthony M. Kennedy wrote in a 2017 decision striking down a North Carolina law that barred sex offenders from certain social media sites. “These websites can provide perhaps the most powerful mechanisms available to a private citizen to make his or her voice heard.”

Randall’s Facebook page is separate from the county-run account governed by acounty social media policy.

She wants the latitude to control what is said on her own unofficial page. Wishing people a Happy Easter, for instance, or saying, “God bless you,” without running afoul of the First Amendment. “I created it, I run it. It’s completely at my discretion what goes on there, and I post what’s important to me. It’s my page,” she said.

The events leading to the lawsuit filed by local activist Brian Davison were laid out during a one-day trial last spring before U.S. District Judge James C. Cacheris.

When Randall joined the board, she invited Loudoun residents to share their views on her “Chair Phyllis J. Randall” page. She encouraged constituents to use her page and county email address for back-and-forth conversations.

Soon after, in February 2016, Randall posted about a public meeting she attended with school officials. That prompted the problematic comment: allegations of corruption and conflicts of interest involving school board members and their relatives. The comment came from a user identified in the post only as “Virginia SGP.”

Randall said she accepts that criticism directed at her is part of the job. But, she said, disparaging other officials’ families anonymously went too far. That evening, she took down the entire thread — and blocked “Virginia SGP,” learning later that it was Davison.

Randall reconsidered and unblocked the user the next day, she said, because she had campaigned to improve government transparency.

Davison is the only person Randall has ever blocked, she said, and he has continued to post on her page.

“I believe in the First Amendment,” Randall said, becoming emotional in an interview as she said that, rather than chase a legal case, “I want to fix potholes and decide where to build schools.”

But Randall said she felt she had to appeal. “I’m fair game, but is everyone in the elected official’s life fair game? Where is the line?”

Davison is a software consultant and activist with two children in Loudoun County schools. He has tangled in court with other officials with mixed results. Another federal judge in Virginia dismissed one of his lawsuits last year, and school board members continue to block him from their Facebook pages.

The comment Randall blocked came from the account Davison uses to advocate on local school policy. His allegations, he said, pointed to what he deemed conflicts of interest and were not “slanderous.”

“Most people in power want to control the communication channels,” he said. “That’s what this is about. You have people on both sides of the political spectrum protecting their power.”

On the night he was blocked, Davison emailed the Loudoun supervisors and the county attorney, claiming the block was unconstitutional.

He also tagged Randall in a Facebook post, writing that she had “earned yourself a trip to the federal court in Alexandria to explain why you discriminate based on feedback.”

Randall says she didn’t see the email or Facebook post until after she had reopened her page.

Clear rules are needed, Davison said, to protect speech and prevent elected officials throughout the country from shutting out critics.

Randall spent a career as a mental health therapist in the prison system before her election in 2015 as chair of the Loudoun County Board of Supervisors. The first thing she put on the wall of her fifth-floor office was a framed copy of an ethics code she proposed to encourage transparency in government. Hanging nearby are signs for the Women’s March, the March for Our Lives against gun violence and a framed photo of President Barack Obama.

She refers to the case at the U.S. Court of Appeals for the 4th Circuit as “an enormous nightmare” and is deeply conflicted about her role and its implications, not just for her legacy but because of what a decision could mean for Trump and what she sees as his more sweeping blocks. “We’re not on the same wavelength, “ she said, “which is why this is so horrific for me.”

On appeal at the 4th Circuit this fall, the judges considered whether a social media account maintained by a public official is akin to an official government forum and subject to constitutional protections.

Leo P. Rogers, the county’s attorney who is representing Randall, told the appeals panel of three judges that the government does not control Randall’s page.

Through Facebook, she was acting in her personal capacity, he said, just as politicians throughout history have given campaign speeches from their front porches or at private fundraisers.

But judges Pamela Harris, Barbara Milano Keenan and James A. Wynn Jr. explored whether there is a distinction between the “Chair Phyllis J. Randall” page for Randall’s county-related activities and two others Randall maintains — one personal and the other for politicking.