© Howard CannonOccupy Boston protesters have encamped in a downtown city square since late September, setting up more than 100 tents.
A Massachusetts judge has ruled against Occupy Boston protesters' ability to camp in a downtown city square, setting up a possible confrontation with authorities who issued a midnight deadline to clear out or face eviction.

Superior Court Judge Frances A. McIntyre said Wednesday that demonstrators' First Amendment rights do not extend to seizing and holding areas on which they sit.

Authorities are "obligated by law to preserve Dewey Square as a space open to the public," McIntyre added.

Boston Mayor Thomas M. Menino, who in the past has appeared to tolerate his city's chapter of the nationwide movement, recently signaled that the park could be a safety hazard as winter weather rolls in.

"We're asking them to leave according to their own will and volition," Menino told CNN affiliate WCVB. "After that we'll make decisions about how we'll clear off the site in the future."

Protesters have set more than 100 tents in the square, having encamped there since late September.

On Thursday, police could be seen handing out fliers to protesters in an apparent effort to inform them that they soon had to leave.

"It's like telling you to get out of your apartment by midnight," protester Philip O'Connell told the affiliate station.

By Thursday evening, comments on an Occupy Boston Twitter feed were focused on the impending deadline.

"Some tents may fold, but an idea cannot be evicted," read one post.

"We have occupied Dewey Square because Wall Street has occupied our government," read another.

In October, 129 people were arrested during a demonstration in which protesters allegedly blocked traffic and refused to disperse, according to police spokesman Eddy Chrispin.

They were arrested mostly for "unlawful assembly and trespassing," he said.

The movement, which first sprang up in a Lower Manhattan park, seeks to highlight what it sees as corruption and growing income disparities between the nation's richest 1% and the rest of the country.

In a move similar to McIntyre's ruling, a New York Supreme Court announced last month that Occupy protesters would be allowed to return to Zuccotti Park -- considered a home base for demonstrators -- but would be restricted from camping overnight.

Police in riot gear cleared them out in the early morning hours in mid-November, a move that attorneys for the demonstrators have said was unlawful.

Thousands later deluged the city's financial district in a show of strength echoed nationwide as part of the group's so-called "mass day of action."

Scores were arrested across the city, and several police officers were reported injured, as thousands of others gathered in places such as St. Louis, San Francisco, Denver and Milwaukee to respond to the "day of action" plea.

Last month, police in Los Angeles and Philadelphia dismantled tents and arrested Occupy protesters who refused to leave city areas.

In Philadelphia, police arrested 52 people after scuffles broke out when authorities ordered some protesters to clear the street.

Encampments have largely remained in a handful of cities, including San Francisco; Asheville, North Carolina; Oklahoma City; and Washington, according to media reports and group websites.