Nearly six months after Occupy New Haven set up camp on the New Haven Green, federal judge Mark Kravitz gave the city permission to tear it down.

In a court decision released Monday afternoon, Kravitz ruled that the city was within its rights when city officials asked protesters to leave the park last month. Members of Occupy New Haven have until noon Tuesday to pack up before the city can clear the Green of all structures.

“This decision, the first ruling to address the full range of legal arguments and facts involved in this case, means that the New Haven Green will once again be a place for all and not serve as a private residence for a few,” Mayor John DeStefano Jr. said in a statement following the decision. “The City will honor the Court’s request and we expect the members of Occupy New Haven to do the same.”

Kravitz disagreed with Occupy attorney Norm Pattis’ argument that the decision to evict Occupy New Haven infringed on protesters’ First Amendment rights. In the ruling, Kravitz also described the relationship between the city and the Proprietors of the Green — the centuries-old private organization that owns the park — as “troubling.” But Kravitz’s finding did not affect his ruling on the main case, and he did not forward the question of the Proprietors’ right to the Green to the Connecticut Supreme Court, as Pattis had hoped.

When Occupiers first arrived on the Green in October, the City Hall was cooperative. At the time, then-City Hall spokesman Adam Joseph said the city’s only concern was with public safety around the encampment.

With the arrival of warmer temperatures, city officials and the Proprietors said they were concerned that Occupy New Haven’s presence on the Green hindered others who wanted to use the public space. They also worried the encampment could cause long-term damage to the Green.

After two meetings between city officials and protesters failed to reach an acceptable compromise, city officials issued a notice to the encampment on March 12 that the Green would have to be cleared of tents by March 14. But following a last-minute lawsuit by Pattis, judge Janet Hall extended Occupy New Haven’s stay on the Green through March 28, when Kravitz was to hear the full case.

Kravitz himself extended Occupy’s deadline to Monday in order to have time to consider the case. Occupy New Haven is the last surviving encampment of the Occupy movement in New England.