Police in riot gear closed in before dawn on Monday on anti-Wall Street activists in Los Angeles who defied a midnight deadline to vacate a camp outside City Hall, but stopped short of clearing the encampment.

Police managed to reopen blocked streets for morning rush-hour commuters after a tense standoff with protesters who had taken over a downtown intersection, but remnants of a crowd that had swelled to 2,000 overnight remained at City Hall.

Four demonstrators were arrested during the brief confrontation, accused of being present at an unlawful assembly, before police ultimately pulled back from City Hall park.

Later, attorneys for Occupy LA asked a federal judge for an injunction barring police from evicting the camp, arguing that Mayor Antonio Villaraigosa and police chief Charlie Beck had violated their civil rights by ordering it dismantled.

The Los Angeles encampment, which officials had tolerated for weeks even as other cities moved in to clear out similar camps, is among the largest on the West Coast aligned with a 2-month-old national Occupy Wall Street movement protesting economic inequality and excesses of the U.S. financial system.

Villaraigosa eventually gave protesters until just after midnight to remove their tents and leave or face a forcible removal, setting the stage for the latest showdown between leaders of a major U.S. city and the Occupy movement.

But about two hours after the eviction deadline had passed, police commanders said they would permit the Occupy LA encampment to stay until at least daybreak. Police Commander Andrew Smith later said he thought it was highly unlikely that the camp would be forced to shut down on Monday.

Elsewhere in the country, a 5 p.m. Sunday deadline set by Philadelphia officials for Occupy protesters there to move from a similar encampment came and went without incident.

Dozens of people heeded the order but many tents and other structures stayed put. Police sources said authorities were hoping the rest of the protesters would relocate voluntarily and that no major actions were expected before Tuesday.

'WHOSE STREET? OUR STREET!'

Staking its place since October 1 on the grounds surrounding City Hall, the Los Angeles camp had grown to roughly 400 tents and 700 to 800 people, organizers and municipal officials said. At least a third of campers were believed to be homeless.

By Sunday night the size of the crowd outside City Hall swelled further as supporters from organized labor, clergy, civil rights and other groups streamed into the area, answering a call for an 11th-hour show of support.

The overall number of protesters, some wearing gas masks, had grown to at least 2,000 by late Sunday, police estimated.

After keeping out of sight throughout the day on Sunday, police began to make their presence known as the mayor's eviction deadline passed, and the protesters' mood turned from calm and festive to rowdy.

Demonstrators and police confronted each other overnight but except for some debris thrown by protesters at one point, there was no violence. One skirmish involved an intersection occupied by protesters.

Minutes after ordering protesters in the street to disperse, dozens of helmeted police carrying night sticks and special shotguns for firing bean-bag projectiles enclosed the intersection and forced their way into the crowd.

Most in the crowd quickly retreated into the park, as onlookers chanted Whose street? Our Street at police and shouted at those defying police to Get off the street!

Someone hurled what appeared to be pieces of a bamboo pole and a bottle at police, and Smith said four people were arrested.

Los Angeles has been relatively accommodating to its Occupy group compared to other major cities, with Villaraigosa at one point providing ponchos to campers when it rained.

But after the collapse of negotiations aimed at persuading protesters to relocate voluntarily, the mayor said last week the encampment would have to go.

The mayor complimented the protesters on Sunday for staying peaceful. But he added in a statement: It is time for Occupy LA to move from focusing their efforts to hold a particular patch of park land to spreading the message of economic justice and restoration of balance to American society.

He said he hoped to avoid the sporadic violence that erupted in other cities when police used force against Occupy protesters.

A number of protesters early on Monday credited the police with showing restraint, including Clark Davis, an Occupy LA organizer, who said to Smith and a group of other officers standing by, You guys have been fantastic.