Hundreds of police officers in riot gear raided the park before dawn on Tuesday, evicting and arresting hundreds of protesters from what has become the epicentre of the worldwide movement protesting corporate greed and economic inequality.
But hours later, the National Lawyers Guild obtained a court order allowing them to return.
The lawyers said the injunction prevents the city from enforcing park rules on the protesters.
At a morning news conference, Mayor Michael Bloomberg said the evacuation was conducted in the middle of the night "to reduce the risk of confrontation in the park, and to minimise disruption to the surrounding neighbourhood".
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
Hundreds of police officers surrounded the park overnight in riot gear, holding plastic shields and batons which in some cases were used on protesters. Police flooded the park with klieg lights and used bull horns to announce that everyone had to leave.
About 200 people were arrested, including some who chained themselves together. Others chanted or shouted angrily at police and vowed to march in protest.
Protesters in New York fought back the threat of a similar sweep weeks ago, but momentum against the camps appears to be growing as authorities across the US grow impatient with the self-proclaimed leaderless movement and its lack of a focused demand.
Bloomberg said the city knew about the court order on Tuesday but had not seen it and would go to court to fight it.
"From the beginning, I have said that the city had two principal goals: guaranteeing public health and safety, and guaranteeing the protesters' First Amendment rights" to free speech, he said in a statement. "But when those two goals clash, the health and safety of the public and our first responders must be the priority."
By mid morning, the park was power-washed clean by sanitation workers. Police in riot gear ringed the public space, waiting for orders to reopen it.
The city told protesters they could come back after the cleaning, but under new tougher rules, including no tents, sleeping bags or tarps, which would effectively put an end to the encampment if enforced.
Concerns about health and safety issues at Occupy Wall Street camps around the US have intensified, and protesters have been ordered to take down their shelters, adhere to curfews and relocate so that parks can be cleaned.
Police have made similar sweeps and arrests in recent days in Oakland, California and Portland, Oregon.
And London authorities announced on Tuesday they would resume legal action to clear a protest camp outside St Paul's Cathedral.

