BOSTON (CBSNewYork/AP) — Thousands of demonstrators chanting anti-Nazi slogans converged Saturday on downtown Boston in a boisterous repudiation of white nationalism, dwarfing a small group of conservatives who cut short their planned “free speech rally” a week after a gathering of hate groups led to bloodshed in Virginia.

“I’m proud of the fact that here in Boston we were able to have a very successful day,” Boston Mayor Marty Walsh said Saturday afternoon.

READ MORE: Dozens Of West Point Cadets Required To Repeat A Year After Cheating Scandal, 8 Expelled

Counter-protesters marched through the city to historic Boston Common, where many gathered near a bandstand abandoned early by conservatives who had planned to deliver a series of speeches. Police vans later escorted the conservatives out of the area, and angry counter-protesters scuffled with armed officers trying to maintain order. 

Police Commissioner William Evans estimated there were about 40,000 people there in total. He said there were 27 arrests, most for disorderly conduct, though some were for assault and battery on police officers.

Police took three people wearing ballistic vests into custody, including one who had a gun. Evans also said bottles of urine were thrown at some officers.

There were no serious injuries and no significant property damage.

Evans said he was proud of the city for taking a stand against hate and proud of the police department for executing its plan to keep the groups separated. 

Evans said Friday that 500 officers — some in uniform, others undercover — would be deployed to keep the two groups apart on Saturday. Walsh, a Democrat, and Massachusetts’ Republican governor, Charlie Baker, both warned that extremist unrest wouldn’t be tolerated in this city famed as the cradle of American liberty.

More from CBS Boston

Organizers of the midday event, billed as a “Free Speech Rally,” have publicly distanced themselves from the neo-Nazis, white supremacists and others who fomented violence in Charlottesville on Aug. 12. A woman was killed at that Unite the Right rally, and scores of others were injured, when a car plowed into counter-demonstrators.

Stephen McGrath, an Army veteran, joined the free speech group during the event.

“Everyone has different views, and if you take it to the violence level, then you lose your argument 100 percent,” he said.

But opponents feared that white nationalists might show up in Boston anyway, raising the specter of ugly confrontations in the first potentially large and racially charged gathering in a major U.S. city since Charlottesville.

READ MORE: COVID In New York: Variants Blamed For Nearly Half Of New Infections In Past Week

“I accept free speech, but that’s not free speech. That’s hate speech,” counter-protester Tom Gallagher said.

Events were planned around the country, in cities including Atlanta, Dallas and New Orleans.

Walsh greeted counter-protesters Saturday morning outside Reggie Lewis Center in the city’s Roxbury neighborhood. Counter-protesters from Black Lives Matter and other groups denouncing racism and anti-Semitism marched from there to the Common, and another group plans to rally on the steps of the Statehouse overlooking the sprawling park.

The permit issued for the rally on Boston Common came with severe restrictions, including a ban on backpacks, sticks and anything that could be used as a weapon. The permit is for 100 people, though an organizer has said he expected up to 1,000 people to attend.

The Boston Free Speech Coalition, which organized the event, said it has nothing to do with white nationalism or racism and its group is not affiliated with the Charlottesville rally organizers in any way.

“We are strictly about free speech,” the group said on its Facebook page. “… we will not be offering our platform to racism or bigotry. We denounce the politics of supremacy and violence.”

But the mayor pointed out that some of those invited to speak “spew hate.” Kyle Chapman, who described himself on Facebook as a “proud American nationalist,” said he will attend.

Black Lives Matter said Friday that members from around the U.S. planned to march Saturday in Boston.

Walsh said the city would do whatever is necessary to head off violence initiated by either side. “If anyone gets out of control — at all — it will be shut down,” he said.

“We will not tolerate any misbehavior, violence or vandalism whatsoever,” said Evans, Boston’s top cop. “To all those who’ve shared prayers & support for my officers heading into today’s rally, I’d like to say thank you.”

Dating to 1634, Boston Common is the nation’s oldest city park. The leafy downtown park is popular with locals and tourists and has been the scene of numerous rallies and protests for centuries.

MORE NEWS: Police: Long Island Man Gave Woman His License After Breaking Into Her Hotel Room, Stealing Money

(© Copyright 2017 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)