Berkeley, California, known as the home of the free speech movement, was under heavy police watch on Thursday as hundreds of people waving American flags and chanting "USA" gathered in a park to protest a canceled appearance by conservative commentator Ann Coulter.

Berkeley police erected barricades and refused to let any protesters enter the campus. Five people were arrested — two for resisting arrest, one for possessing a knife, one for possessing a controlled substance and one for inciting a riot.

Coulter previously said she was forced to cancel a speaking event at the University of California, Berkeley, although she added that she might still "swing by to say hello'' to her supporters, prompting police and university officials to brace for possible trouble. She was not spotted at the rallies.

I’m so sorry Berkeley canceled my speech. I’m so sorry YAF acquiesced in the cancelation. And I'm so sorry for free speech crushed by thugs. — Ann Coulter (@AnnCoulter) April 26, 2017

In emails to The Associated Press, Coulter confirmed Wednesday that her planned speech on illegal immigration, followed by a question-answer session, was canceled. But she remained coy about what she might do instead.

"I'm not speaking. But I'm going to be near there, so I might swing by to say hello to my supporters who have flown in from all around the country," Coulter said in an email. "I thought I might stroll around the graveyard of the First Amendment."

She expressed similar sentiments on Twitter, bemoaning the right to free speech being "crushed by thugs."

But Berkeley Chancellor Nicholas Dirks and Berkeley Mayor Jesse Arreguin defended how planning the event was handled in a joint statement on Thursday: "Creating an environment that prevents violence is not censorship, rather it is protection of free speech. Ann Coulter did not take up the University’s offer to have the event held at a time where we could ensure safety."

Wilson Grafstrom, an 18-year-old high school student from Menlo Park, blamed opponents of Coulter for forcing him to gear up for problems — he wore a military grade helmet with a "Make America Great Again'' sticker across the back, goggles, gas mask and knee pads.

"It's a shame that someone can't speak in the home of the free speech movement," Grafstrom said.

Police and university officials were on alert regardless of whether Coulter followed through on her suggestion she'd swing by, citing intelligence and online chatter by groups threatening to instigate violence.

Officials at Berkeley said last week they feared renewed violence on campus if Coulter followed through with plans to speak. They cited "very specific intelligence" of threats that could endanger Coulter and students, as Berkeley becomes a platform for extremist protesters on both sides of the political spectrum.

"While we cherish our freedoms of speech and assembly, there is no freedom to silence others or to commit violence," Dirks and Arreguin wrote.

A group called Make Orange County Great Again first gathered at the Martin Luther King Jr. Civic Center Park at 10 a.m. Although the rally itself drew only a few American-flag toting participants, social media posts showed a large number of police cars and motorcycles with an estimated 100-plus officers milling in the area.

Around 11 a.m., protesters seemed to migrate to Berkeley, where a sign at Sproul Plaza laid out what items people were allowed to bring to the protest, what might lead to searches, and what was banned.

Berkeley police said in a statement that the first person arrested was charged with delaying or obstructing a police officer in the course of duty, providing false identification to a police officer and wearing a mask to conceal his identity and evade police. He was also carrying a sign that was larger than the permitted 30-by-30 inches.

The second person was found carrying a knife, according to police. Neither person's affiliation was confirmed by police.

The International Socialist Organization also invited students and Berkeley residents to an "Alt Right Delete" news conference at noon at the corner of Bancroft Way and Telegraph Avenue. The event was aimed at people "who oppose racist provocateurs as much as they support freedom of speech and assembly," organizers said in an email.

People faced off with each other, chanting opposing slogans, tweets showed. Some pushed for a dialogue, others debated the teachings of Christianity, and still more shouted, "They want you to be complicit" and "Say it loud, say it clear. Refugees/immigrants are welcome here."

One man's sign summarized the opposing viewpoints succinctly. "The issue is not free speech. The issue is fascism," it read.

A photo by Twitter user Art Tavana also indicated that Kyle Chapman, also known as Based StickMan, had arrived on the scene of the protests. Chapman has been arrested during the last two violent demonstrations in Berkeley. At "March 4 Trump," he struck an Antifa member on the head with a stick, police said.

Last week, efforts by the university to cancel or delay the event dealt a blow to Berkeley's image as a bastion of tolerance and free speech.

Dirks sent a letter to the campus Wednesday saying the university is committed to defending free speech but also to protecting its students.

"This is a university, not a battlefield," Dirks said in the letter. "The university has two non-negotiable commitments, one to free speech, the other to the safety of our campus community."

Dirks also countered claims that police backed down when violence erupted on the campus and in Berkeley in general over the past several months.

"The strategies necessary to address these evolving threats are also evolving, but the simplistic view of some – that our police department can simply step in and stop violent confrontations whenever they occur – ignores reality," Dirks continued. "Because threats or strategic concerns may differ, so must our approach."

Even so, Dirks extended an invitation to Coulter and said the university "will assume the risks, challenges, and expenses" that accompany a future visit. He proposed May and September as alternative opportunities.

"What we will not do is allow our students, other members of the campus community, and the public to be needlessly endangered by permitting an event to be held in a venue that our police force does not believe to be protectable," he said.

Berkeley's reputation as one of the country's most liberal universities, in one of America's most liberal cities, has made it a flashpoint for the nation's political divisions in the Trump era.

Earlier this month, a bloody brawl broke out in downtown Berkeley at a pro-Trump protest that featured speeches by members of the white nationalist right. They clashed with a group of Trump critics who called themselves anti-fascists.

Similar violent clashes also erupted at the same site, a public park, on March 4.

In February, violent protesters forced the cancellation of a speech by right-wing writer Milo Yiannopoulos, who like Coulter was invited by campus Republicans.

The Berkeley College Republicans and the Young America's Foundation, a conservative group that had helped book Coulter's campus speaking events, both pulled their support Tuesday citing fears of violence. They blamed the university for failing to ensure the protection of conservative speakers.

"Berkeley College Republicans do not want to endanger people's lives so because of the university's unwillingness to do their job we are forced to cancel the event," Troy Worden, president of the campus Republicans, said Wednesday.

Coulter echoed the blame on Twitter: "I'm very sad about Berkeley's cancellation, but my sadness is greater than that. It's a dark day for free speech in America."

Harmeet Dhillon, an attorney for Young America's Foundation and the Berkeley College Republicans, also criticized the university's "unequal rules and inequitable actions."

"This is a long game that we're playing," she said of the lawsuit,

A legal team, including Dhillon, has filed a lawsuit on behalf of Coulter and the Berkeley College Republicans, claiming university officials violated free speech rights by calling off Coulter's speaking visit. The University of California system University of California, Berkeley, Police Department and numerous university officials were named in the lawsuit.