PHILADELPHIA—Thirty-one Occupy Philadelphia protesters arrested after the eviction of their City Hall encampment were acquitted on all charges Thursday, a ruling the group celebrated as a victory for free-speech rights.

The protesters had faced misdemeanor charges of conspiracy, failure to disperse and obstructing a highway in connection with the November eviction, in which police uprooted dozens of tens and cleared out the more than two-month-old encampment. In the hours after the raid, hundreds of protesters poured across downtown and dozens were arrested on minor charges.

Municipal Judge Karen Simmons granted a defense motion for acquittal after hours of testimony, including video from the raid and lengthy statements from a police captain who headed the department's civil affairs division at the time. Prosecutors didn't meet the threshold to show disorderly conduct, Simmons concluded, and protesters were arrested after complying with an order to get onto the sidewalk. She also said there was no evidence they made the street impassable.

"Occupy goes on," attorney Lawrence Krasner, who represented several of the defendants, said outside court. "Free speech goes on."

Vince Regan, an assistant district attorney who prosecuted the case, said he was disappointed by the outcome, but respected the judge's decision.

Capt. William Fisher, who headed the police department's civil affairs division at the time, testified that at some point hours after the encampment was raided—as protesters streamed through downtown—a higher-up in the department gave the order that the protesters had to be stopped.

"There was a decision made that this had to stop, this activity," Fisher testified. "The decision was you had to start getting the streets clear for morning rush hour."

The protesters had been camped outside City Hall since October in solidarity with Occupy Wall Street in New York, speaking out against economic inequality and what they called corporate greed.

Police raided the encampment in the early hours of Nov. 30, after city officials had ordered the protesters to leave to make way for a long-scheduled construction project at the plaza. Officers pulled up tents and told protesters to leave, after which hundreds began streaming across the city's downtown. Officers followed them for hours until, according to Fisher, the order was given for the protesters to be stopped.

Defense attorneys argued Thursday the city had shut down part of the roadway and that the protesters themselves were not blocking it. They said the fire trucks, police cars, and streets department crews cleaning the area were able to move freely on the street. They also said the protesters were arrested after being given an order to move onto the sidewalk, and that they were not given an order to disperse.

"That job of the police had essentially been done," defense attorney Paul Hetznecker said, noting that the camp had long since been cleared by the time of the arrests. "The sidewalk is protected. ... Someone made a decision, arbitrarily, capriciously, that this was going to end, in violation of the First Amendment."

One of the protesters arrested called the acquittal a victory for the movement, which pushed for economic equality and other issues.

"We feel like it was an absolute victory and a vindication of our position," said TJ Ghose, 40, an assistant professor of social work at the University of Pennsylvania. "We were protesting something that pertains to everyone."