Tens of thousands of gun-rights activists from around the country rallied peacefully at the Virginia Capitol on Monday to protest plans by the state’s Democratic leadership to pass gun-control legislation — a move that has become a key flash point in the national debate over gun violence.

The size of the crowd and the expected participation of white supremacists and fringe militia groups raised fears that the state could see a repeat of the violence that exploded in 2017 in Charlottesville. But the rally concluded uneventfully around noon, and the mood was largely festive, with rally-goers chanting “USA!” and waving signs denouncing Democratic Gov. Ralph Northam.

Many protesters chose not to enter the designated rally zone, where Northam had imposed a temporary weapons ban, and instead packed surrounding streets, many dressed in tactical gear and camouflage and carrying military-style rifles as they cheered on the speakers.

“I love this. This is like the Super Bowl for the Second Amendment right here,” said P.J. Hudson, a truck driver from Richmond who carried an AR-15 rifle just outside Capitol Square. He was one of the few African American rally-goers in a crowd that was overwhelmingly white and male, and was frequently stopped and asked to pose for pictures wearing his “Black Guns Matter” sweatshirt.

An estimated 22,000 people attended, according to authorities, who said one woman was arrested on felony charge of wearing a mask in public.

The protesters came out despite the frigid temperature to send a message to legislators, they said.

“The government doesn’t run us, we run the government,” said Kem Regik, a 20-year-old private security officer from northern Virginia who brought a white flag with a picture of a rifle captioned, “Come and take it.”

Northam was a particular focus of the protesters’ wrath. One poster showed his face superimposed on Adolf Hitler’s body.

The governor said in a statement he was “thankful” the day passed peacefully and that “he will continue to listen to the voices” of Virginians while doing everything in his power “to keep our commonwealth safe.”

“The issues before us evoke strong emotions, and progress is often difficult,” Northam said.

“I was prepared to see a whole lot more people show up than actually did and I think it’s an indication that a lot of this rhetoric is bluster, quite frankly,” said Del. Chris Hurst, a gun-control advocate whose TV journalist girlfriend was killed in an on-air shooting in 2015.

Some of the protesters waved flags with messages of support for President Donald Trump. Trump, in turn, tweeted support for their goals.

“The Democrat Party in the Great Commonwealth of Virginia are working hard to take away your 2nd Amendment rights,” he tweeted. “This is just the beginning. Don’t let it happen, VOTE REPUBLICAN in 2020!

The Virginia State Police, the Virginia Capitol Police and the Richmond Police had a heavy presence, with officers deploying on rooftops, patrolling in cars and on bicycles.

Authorities were looking to avoid a repeat of the violence that erupted in Charlottesville during one of the largest gatherings of white supremacists and other far-right groups in a decade. Attendees brawled with counterprotesters, and an avowed white supremacist drove his car into a crowd, killing a woman and injuring dozens more. Law enforcement officials faced scathing criticism for what both the white supremacist groups and anti-racism protesters said was a passive response.

On Monday, Southern Poverty Law Center staff identified members of what it calls extremist militia groups, including the Oath Keepers and Three Percenters, as well as the League of the South and the Proud Boys, which the center classifies as hate groups, according to outreach director Lecia Brooks.

In contrast to Charlottesville, there was little sign of counterprotesters challenging the gun-rights activists.

Police limited access to Capitol Square to only one entrance, and a long line formed to get into the rally zone.

Gun-rights advocates also filled the hallways of the building that houses lawmakers’ offices. One couple, Jared and Marie March, traveled from Floyd County, over three hours west of Richmond, to meet with legislators.

“Guns are a way of life where we live,” said Marie March, who was concerned about a proposed red-flag law she said would allow citizens to be stripped of their guns due to “subjective criteria.” A proposal to establish universal background checks amounted to “more Big Brother,” she said. “We just feel like we need to push government back into their rightful spot.”

Monday’s rally was organized by an influential grassroots gun-rights group, the Virginia Citizens Defense League. The group holds a yearly rally at the Capitol, typically a low-key event with a few hundred gun enthusiasts listening to speeches from a handful of Republican lawmakers. But this year’s event was unprecedented. Second Amendment groups have identified the state as a rallying point for the fight against what they see as a national erosion of gun rights.

The pushback against proposed new gun restrictions began immediately after Democrats won majorities in both the state Senate and House of Delegates in November, with much of the opposition focused on a proposed assault weapons ban. More than 100 localities have since passed measures declaring support for the Second Amendment.

Erich Pratt, senior vice president of Gun Owners of America, said voters need to replace the Democrats in control of the government in Virginia.

“We need to throw the bums out. We need to clean house in the next election,” he told the crowd.

House Republican Leader Todd Gilbert complimented the behavior of the rally-goers and said Democrats should take a lesson from them.

“The law-abiding gun owners in attendance today are the ones who would bear the brunt of their anti-gun proposals, which would have little to no impact on crime or criminals,” he said in a statement.

The rally coincided with the Martin Luther King Jr. holiday, which is typically a chance for everyday citizens to use a day off work to lobby their legislators. However, the threat of violence largely kept other groups away from the Capitol, including gun control groups that hold an annual vigil for victims of gun violence.

When that event was canceled, students from March for Our Lives, the movement launched after 17 were killed at Marjory Stoneman Douglas High School in Florida in 2018, decided they had to do something. A group of about 15 college students and one high schooler slept overnight in the offices of two Democratic lawmakers to ensure they could make it into the Capitol area safely. The lawmakers, Hurst and Del. Dan Helmer — who’s sponsoring a bill that would block the National Rifle Association from operating an indoor gun range at its headquarters — camped out as well.

Michael McCabe, a 17-year-old high school senior from northern Virginia, said he was there to underscore the “moral urgency” felt by a generation “unduly affected” by gun violence.

“Our main goal is not to engage with gun extremists today,” McCabe said. “We are really here to be present in the legislature to make our voices heard.”