The city said it set free nearly 500 protesters late Thursday after being fined by a judge for failing to immediately release the demonstrators, who had spent the previous days venting their rage at the Bush administration.

The legal battle came as the convention received a mostly mellow sendoff from protesters.

Hundreds of them gathered — noisily but without incident — near Madison Square Garden (search) as a huge wall of police stood between them and the site of the convention. As President Bush began his nomination acceptance speech inside at about 10 p.m., the crowds of protesters outside began to disperse. The week saw nearly 1,800 arrests in all, but only 26 on Thursday.

"It's been a long week," explained demonstrator Sam Nolan, 37, as he walked away from the protest. "The cops really wore us down. I guess people got intimidated."

There were accusations that the city was deliberately holding the protesters longer so they would not be in the streets during Bush's speech.

"The evidence shows that the city told defendants that they would not be released until George Bush went home," said Dan Alterman of the National Lawyers Guild.

The New York Police Department denied the charge.

"The allegations that the NYPD was purposely holding demonstrators until after the president of the United States left New York City was part of a deliberate misinformation campaign," police spokesman Paul Browne said.

State Supreme Court Justice John Cataldo fined the city $1,000 for every protester held past a 5 p.m. deadline that he had set for their release. It was unclear how many detainees were still in custody, but Cataldo had ordered the release of 470 people.

"These people have already been the victims of a process," Cataldo told the city's top lawyer. "I can no longer accept your statement that you are trying to comply."

City Corporation Counsel Michael Cardozo tried in vain to convince the judge that the city was trying desperately to comply with his wishes.

"We can't just open the jails of the city of New York and let everybody out," Cardozo said. "We're not trying to flout your honor's order. ... We're doing everything humanly possible."

He later said the judge "was wrong not to permit the city sufficient time" to process all the detainees. Cardozo called the fines unwarranted and said the city would consider its legal options when the fines are assessed.

At the courthouse, about 40 to 50 protesters in a park across the street cheered and applauded as detainees walked out.

About 50 of the detainees had launched a hunger strike Thursday to protest their extended time behind bars while awaiting arraignment. They were turning down the sandwiches and milk served three times a day until everyone was freed.

On Thursday, New York commuters were greeted at Grand Central Station by about 100 demonstrators unfurling banners and releasing colorful balloons urging Bush to do more in the fight against AIDS.

Thousands of protesters also milled around Union Square at a candlelight vigil organized by United for Peace and Justice.

"I'm here as an advocate for peace," said John Morris, 44, sitting with a candle in his hands. "Our president missed an opportunity for peace, and we need a new leader."