New York City on Tuesday reopened the park in Lower Manhattan where the Occupy Wall Street movement was born not long after a judge upheld the city’s move to clear the park and bar the protesters from bringing back their tents or staying overnight.

The police opened the gates to Zuccotti Park just after darkness fell and let in a single-file line of people as a crowd surrounded the park. Some chanted “Let us in. Let us in.”

“You have to walk through a gantlet of officers,” said Andy Nicholson, 54, of Manhattan, who entered the park, stopped and was told by the police to move along. “It’s all about control,” he said.

The park had been closed since a surprise police raid that began at about 1 a.m. The police not only removed the protesters who had camped there for almost two months, they removed their tents, tarps and belongings. As the morning unfolded, Mayor Michael R. Bloomberg on Tuesday defended the decision to clear the park, saying “health and safety conditions became intolerable” in the park.

He also told a City Hall news conference that in approving the police operation, he had had to balance concerns about free speech against concerns about what had been happening in the park.

“New York City is the city where you can come and express yourself,” the mayor said. “What was happening in Zuccotti Park was not that.” He said the protesters had taken over the park, “making it unavailable to anyone else.”

Mr. Bloomberg said the city had planned to reopen the park on Tuesday morning after the protesters’ tents and tarps had been removed and the stone steps had been cleaned. He said the police had already let about 50 protesters back in when officials received word of a temporary restraining order sought by lawyers for the protesters. The police closed the park again while a judge heard arguments in State Supreme Court.

The judge, Justice Michael D. Stallman, handed down his decision late Tuesday afternoon, ruling for the city and saying the protesters could go into Zuccotti Park but could not take their tents and sleeping bags. Justice Stallman said that the demonstrators “have not demonstrated that they have a First Amendment right to remain in Zuccotti Park, along with their tents, structures, generators and other installations” — to the exclusion of the landlord or “others who might wish to use the space safely.”

The mayor’s comments at a City Hall news conference came about seven hours after hundreds of police officers moved in to clear the park, after warning that the nearly two-month-old camp would be “cleared and restored” but that demonstrators who did not leave would face arrest. The protesters, about 200 of whom have been staying in the park overnight, initially resisted with chants of “Whose park? Our park!”

The police commissioner, Raymond W. Kelly, said that nearly 200 people had been arrested, 142 in the park and 50 to 60 in the streets nearby. Most were held on charges of disorderly conduct and resisting arrest, among them City Councilman Ydanis Rodriguez, a Democrat who represents northern Manhattan. He was with a group near the intersection of Broadway and Vesey Street that was trying to link up with the protesters in the park. The group tried to push through a line of officers trying to prevent people from reaching the park.

Later in the day, the police cleared a lot at Canal Street, about a mile away, where some of the protesters had gone after the sweep. About two dozen people were arrested there after protesters snipped a chain-link fence with bolt cutters. At least four journalists who trailed the protesters as they went through the opening in the fence were also led out in handcuffs, including a reporter and photographer for The Associated Press and a reporter from The Daily News.

The operation in and around the park was a blow to the Occupy Wall Street movement, which saw the park as its spiritual heart. The sweep was intended to empty the birthplace of a protest movement that has inspired hundreds of tent cities from coast to coast. On Monday, hundreds of police officers raided the main encampment in Oakland, Calif., arresting 33 people. Protesters returned later in the day. But the Oakland police said no one would be allowed to sleep there anymore, and promised to clear a second camp nearby.

The police action was quickly challenged as lawyers for the protesters obtained a temporary restraining order barring the city and the park’s private landlord from evicting protesters or removing their belongings. That left the protesters in a kind of limbo as they waited for Justice Stallman to issue his ruling.

Occupy Wall Street’s legal team had spent most of the day trying to reverse the reasoning the city used as the legal underpinning for the sweep. The protesters’ lawyers said after Justice Stallman issued the decision that their clients would continue their struggle.

“This has not stopped the movement,” said Yetta Kurland, one of the lawyers for the protesters. “Win, lose or draw, the 99 percent will continue to show up, continue to express themselves.”

The mayor, at his news conference in the morning, read a statement he had issued around 6 a.m. explaining the reasoning behind the sweep. “The law that created Zuccotti Park required that it be open for the public to enjoy for passive recreation 24 hours a day,” the mayor said in the statement. “Ever since the occupation began, that law has not been complied with” because the protesters had taken over the park. “I have become increasingly concerned — as had the park’s owner, Brookfield Properties — that the occupation was coming to pose a health and fire safety hazard to the protesters and to the surrounding community,” Mr. Bloomberg said. He added that on Monday, Brookfield asked the city to assist in enforcing the no sleeping and camping rules.

“But make no mistake,” the mayor said, “the final decision to act was mine and mine alone.”

Some of the displaced protesters regrouped a few blocks away at Foley Square, with the row of courthouses on Centre Street as a backdrop, and swapped stories of their confrontations with the police as they talked about what to do next.

One protester, Nate Barchus, 23, said the eviction from Zuccotti Park was likely to galvanize supporters, particularly because a series of gatherings had already been planned for Thursday, the protest’s two-month anniversary.

“This,” he said, referring to the early morning sweep, “reminds everyone who was occupying exactly why they were occupying.”

The midday arrests at the Canal Street lot unfolded next to a triangular space known as Duarte Square, for the first president of the Dominican Republic, Juan Pablo Duarte. The city owns slightly less than half an acre of land there, on the eastern edge of the square. The western section is owned by Trinity Church, a major landowner downtown, and had been fenced off for the winter recently after an art installation was dismantled.

With dozens of police officers watching, protesters climbed to the top of the plywood fence and held a general-assembly-style discussion on whether to “liberate another piece of property,” and about an hour later — after some protesters said they had tried to obtain permission to enter the church’s lot — two protesters dressed in black appeared with bolt cutters. They quickly made an opening in the fence.

As the crowd poured in, police vans sped down Varick Street toward Zuccotti Park, where another group of several hundred protesters was trying to retake the space where they had camped out since mid-September. It was cleaner than it had been in some time: after the protesters were thrown out, workers using power washers blasted water over the stone that covers the ground.

The cleaned-up park caught the attention of passers-by who had become accustomed to seeing the protesters’ tents and tarps. One young father, pushing his toddler son in a stroller, gave police officers guarding Zuccotti Park a thumbs-up sign.

Another man, rushing by in a cream suit, flashed them a huge grin, and a blonde woman stopped in her tracks. “Ooh, good,” she said.

Marybeth Carragher, who lives in a building overlooking the park, said she and other residents were apprehensive about the city’s plan to let the protesters return, without their tents. “I think my neighbors and I are very thankful that the mayor acted,” she said, “but we remain completely outraged for having to endure this for nine weeks.”

The operation to clear the park had begun near the Brooklyn Bridge, where the police gathered before riding in vans to the block-square park. As they did, dozens of protesters linked arms and shouted “No retreat, no surrender,” “This is our home” and “Barricade!”

The mayor’s office sent out a message on Twitter at 1:19 a.m. saying: “Occupants of Zuccotti should temporarily leave and remove tents and tarps. Protesters can return after the park is cleared.” Fliers handed out by the police at the private park on behalf of the park’s owner and the city spelled out the same message.

The protesters rallied around an area known as the kitchen, near the middle of the park, and began putting up makeshift barricades with tables and pieces of scrap wood.

Over the next two hours, dozens of protesters left the park while a core group of about 100 dug in around the food area. Many locked arms and defied police orders to leave. Some sang “We Shall Overcome” and chanted at the officers to “disobey your orders.”

“If they come in, we’re not going anywhere,” said Chris Johnson, 32, who sat with other remaining protesters near the food area.

By 3 a.m., dozens of officers in helmets, watched over by Commissioner Kelly, closed in on those who remained. The police pulled them out one by one and handcuffed them. Most were led out without incident.

The police move came as organizers put out word on their Web site that they planned to “shut down Wall Street” with a demonstration on Thursday to commemorate the completion of two months of encampment, which has prompted similar demonstrations across the country.

The move also came hours after a small demonstration at City Hall on Monday by opponents of the protest, including local residents and merchants, some of whom urged the mayor to clear out the park.

Before the police moved in, they set up a battery of klieg lights and aimed them into the park. A police captain, wearing a helmet, walked down Liberty Street and announced: “The city has determined that the continued occupation of Zuccotti Park poses an increasing health and fire safety hazard.”

The captain ordered the protesters to “to immediately remove all private property” and said that if they interfered with the police operation, they would be arrested. Property that was not removed would be taken to a sanitation garage, the police said.

About 200 supporters of the protesters arrived early Tuesday after hearing that the park was being cleared. They were prevented from getting within a block of the park by a police barricade. There were a number of arrests after some scuffles between the two sides, but no details were immediately available. After being forced up Broadway by the police, some of the supporters decided to march several blocks to Foley Square.

In the weeks since the protest began, Mr. Bloomberg had struggled with how to respond. He repeatedly made clear that he did not support the demonstrators’ arguments or their tactics, but he has also defended their right to protest and in recent days and weeks has sounded increasingly exasperated, especially in the wake of growing complaints from neighbors about how the protest has disrupted the neighborhood and hurt local businesses.