Bay Area Rapid Transit (BART) police arrest a demonstrator during a protest on the platform at the Civic Center station on August 22, 2011 in San Francisco, California. (Justin Sullivan/GETTY IMAGES)

Police in riot gear. Masked demonstrators ready for a confrontation. And then government forces shut down the wireless network to try to thwart plans for the “flash mob” protest coordinated by cellphones and Twitter.

It’s not a scene from the Arab Spring, but one from America’s beautiful city on the bay, San Francisco. It developed with a backdrop not of tanks and fires but of thousands of annoyed commuters trying to get to their trains.

Worried about a plan to disrupt service, Bay Area Rapid Transit (BART) police this month decided to pull the plug on the system that allows underground cellphone service. It lasted only a few hours, but the decision continues to resonate.

Protests continue, this time about the decision to shut down the cellphones. Civil libertarians are alarmed. And First Amendment scholars are intrigued.

The BART decision may become “a historical marker of sorts as we navigate the intersection, with its occasional collisions, of new technology, public safety and our First Amendment freedoms,” writes Gene Policinski, senior vice president and executive director of the First Amendment Center.

And Michael Risher, an attorney for the ACLU of Northen California, calls it “the first time in the United States that a government entity has shut down a communications network to stop a protest against that very government entity.”

BART officials say they made a rare and reasonable decision faced with credible information that the protesters were prepared to chain themselves to trains and take other action to disrupt service during the “15 busiest minutes of the day.”

“BART temporarily interrupted service at select BART stations as one of many tactics to ensure the safety of everyone on the platform,” officials said in a statement.

The original protests were about the July 3 fatal shooting by transit police of a man they said threw a knife at an officer. One protest followed, and then police learned of a larger demonstration planned for Aug. 11.

The protesters intended to disrupt operations on the train platforms and use cellphones and social media to relay information about police whereabouts, police said. So BART shut down, for several hours at several stations, the network it owns that relays cellphone service underground.

(Metro spokesman Dan Stessel says the Washington system has no means to shut down cellphone service.)

The group Anonymous has joined the loosely organized network of protesters and the protests continue, even though BART has not hit the off switch again.

Was BART’s action constitutional? Marvin Ammori, a First Amendment specialist who writes often about free speech and technology, says it’s “a hard question.”

And that’s partly because the Supreme Court’s decisions on when government may restrict the free speech and rights of assembly guaranteed by the First Amendment are often fact-specific, tempered by “time, place and manner” considerations.

BART officials point to the court’s 1969 decision in Brandenburg v. Ohio that speech is not protected when it is “directed to inciting or producing imminent lawless action.” They attempt to set up an easy test: Speech is protected outside BART’s gates, but people may not “conduct or participate in assemblies or demonstrations or engage in other expressive activities in the paid areas.”

Ammori and Risher said that BART’s test is too broad; wearing a T-shirt or button supporting a candidate or cause has been deemed an expressive political activity. And even if the platforms might be considered a nonpublic forum, government restrictions must still be reasonable and viewpoint-neutral. They don’t think BART’s actions would meet those standards.

Some have wondered, since BART owns the wireless system, why it can’t shut it down whenever it wants. Some public universities, for instance, block service in classrooms when professors believe it’s a distraction.

But the ACLU told BART it can’t withdraw the service to shut down specific speech. “While the government has no obligation to build a public park, once it does so, it cannot shut the park gates to speakers with whom it disagrees.”

The ACLU has not sued BART; Risher said the group is more interested in what will happen going forward.

And BART’s board of directors is unhappy with comparisons to the actions taken by former Egyptian president Hosni Mubarak. Several directors have said that officials made a mistake in cutting the service.

At a special meeting last week to discuss the incident, board President Bob Franklin said the system will develop a policy that would authorize cutting the service only in extraordinary circumstances.

Perhaps the policy will serve as a model for other government agencies, Franklin said: “The issue will undoubtedly arise elsewhere in our nation when issues of freedom of speech and public safety collide.”