RICHMOND, Va. — Alarming calls online for a race war. The arrest of three suspected neo-Nazis. Memories of the explosive clashes in Charlottesville, Va., three years ago.

A sense of crisis enveloped the capital of Virginia on Thursday, with the police on heightened alert and Richmond bracing for possible violence ahead of a gun rally next week that is expected to draw white supremacists and other anti-government extremists.

Members of numerous armed militias and white power proponents vowed to converge on the city despite the state of emergency declared by Gov. Ralph Northam, who temporarily banned weapons from the grounds of the State Capitol. The potential for an armed confrontation prompted fears of a rerun of the 2017 far-right rally that left one person dead and some two dozen injured in Charlottesville, about an hour’s drive from Monday’s rally.

The unease increased after the F.B.I. announced the arrest on Thursday of three armed men suspected of being members of a neo-Nazi hate group, including a former Canadian Army reservist, who had obtained weapons and discussed participating in the Richmond rally. The men were linked to the Base, a group that aims to create a white ethnostate, according to the F.B.I.

For weeks, discussions about the rally have lit up Facebook pages and chat rooms frequented by militia members and white supremacists. Various extremist organizations or their adherents are calling Monday’s rally the “boogaloo.” In the lexicon of white supremacists, that is an event that will accelerate the race war they have anticipated for decades.

“They are fanning the flames for this event,” said Megan Squire, a professor at Elon University in North Carolina who tracks extremist chatter online. “They want chaos.”

The rally on Monday, the holiday marking the birthday of the Rev. Dr. Martin Luther King Jr., was initially organized to protest the Virginia Legislature’s proposed restrictions on gun purchases.

The organizer, the Virginia Citizens Defense League, is prominent in the state’s Second Amendment rights movement, donating tens of thousands of dollars to lawmakers over the years. Its president, Philip Van Cleave, refers to himself as an extremist but issued a statement saying the rally was meant to be a peaceful protest about gun rights.

In the past, its lobbying efforts were focused on loosening the state’s gun laws. But with a new Democratic majority in the Legislature, the group has made it clear that Monday’s event will be focused on opposing sweeping gun control measures that could be enacted next week.

The governor, in declaring a state of emergency throughout the weekend, warned that “armed militia groups planned to storm the Capitol.”

On Thursday, the House of Delegates and the Senate held their regularly scheduled sessions under tighter-than-normal security by the Capitol Police. The Senate approved several gun control measures, including a bill that limits people to buying only one gun each month.

Also Thursday, a circuit court judge upheld the governor’s temporary ban on weapons in the area around the Capitol from Friday until Tuesday.

Governor Northam called it “the right decision.”

“I took this action to protect Virginians from credible threats of violence,” he said in a statement. “These threats are real — as evidenced by reports of neo-Nazis arrested this morning after discussing plans to head to Richmond with firearms.”

The parallels with Charlottesville are inexact because the organizers of Monday’s rally are mainly gun advocates. Charlottesville was a concerted attempt to make far-right, neo-Nazi views more mainstream. There is some overlap among the groups, but the outpouring of online support is an imperfect gauge of who will actually attend.

Still, law enforcement is readying for the worst.

The three men taken into custody on Thursday morning were part of a long-running investigation into the Base. The men were charged with various federal crimes in Maryland, according to the Justice Department.

One of the men, Patrik J. Mathews, 27, a main recruiter for the group, entered the United States illegally from Canada, according to the officials. He was arrested along with Brian M. Lemley Jr., 33, and William G. Bilbrough IV, 19.

Mr. Mathews was trained as a combat engineer and is considered an expert in explosives. The Canadian Army discharged him after his ties to white supremacists surfaced. Mr. Lemley previously served as a cavalry soldier in the United States Army.

Image
Credit…Royal Canadian Mounted Police, via Associated Press

The F.B.I. has grown increasingly concerned about the Base as it has worked to recruit more people. The group encourages the onset of anarchy, according to the Counter Extremism Project, an organization that tracks far-right extremists. Experts say that its founder, an American, appears to be living in Russia.

Former law enforcement officials say the Base and another similarly inspired white supremacist group known as Atomwaffen have become priorities for the F.B.I.

In November, the F.B.I. arrested Richard Tobin, a young man in New Jersey, who was suspected of recruiting on behalf of the Base and of advocating violence, including the killing of black people with a machete.

Mr. Lemley and Mr. Bilbrough were charged on Thursday with transporting and harboring a person who had entered the country illegally, along with conspiracy. Prosecutors also charged Mr. Lemley and Mr. Mathews with transporting a firearm and ammunition with the intent of committing a felony. The complaint also charges Mr. Mathews with possessing a firearm and ammunition while being in the country illegally.

A federal statute defines domestic terrorism but carries no penalties. First and Second Amendment concerns make prosecuting these cases difficult.

According to the authorities, Mr. Lemley and Mr. Mathews made a functioning assault rifle. They also bought more than 1,500 rounds of rifle ammunition, fired the rifle at a Maryland gun range and acquired vests to hold body armor. Although the charges were not directly linked to the Richmond rally, law enforcement officials said the three men had discussed attending it.

Additionally, three other men associated with the Base being tracked by the F.B.I. were arrested on Thursday by the authorities in Georgia. Officials said they were plotting to kill a couple belonging to the loose affiliation of radical activists known as antifa.

Adherents of extremist groups have been beating the drums for people to participate.

One online meme shows half a dozen men who carried out bloody attacks in the United States, Norway and New Zealand, dressing them as biblical saints with halos above their heads. “Virginia Is For” read the headline.

Many of the comments are racist, anti-Semitic and unprintable. “Y’all need to go full white ethnostate and really set the pace for 2020,” said another online message, below the picture of a road sign that had been altered to read “Virginia Is For Gun Lovers.”

The call to arms by others prompted fears that the Richmond rally would foreshadow the tenor of political events throughout what promises to be a fraught presidential election.

“This is about those who want to co-opt these moments and turn it into the start of a civil war or some sort of race war,” said Oren Segal, the director of the Anti-Defamation League’s Center on Extremism. “A lot of this is hyperbole, but who at this point would take that lightly.”

Workers installed temporary barricades and security fencing around the Capitol on Thursday as law enforcement officials announced beefed-up security measures, adding that the thousands of participants expected to attend the rally on Monday will be screened at security checkpoints before being allowed onto the Capitol grounds. That still leaves the possibility that the area outside the grounds will become an armed camp.

Militia members from as far away as Nevada and Oklahoma have announced they will attend — some of them tracked by the Hatewatch research staff at the Southern Poverty Law Center as well as the Anti-Defamation League.

They include national militias such as the Oath Keepers and American Patriots the III%. Members of the Gun Owners of America, an organization whose members consider the National Rifle Association too feeble, also announced plans to attend. Erich Pratt, the host of the Gun Owners of America’s podcast, has championed the idea that possible changes in Virginia’s gun laws are a precursor to the confiscation of weapons.

Several Confederate militias are also planning to attend the Richmond rally after attending an annual march in Lexington, Va., the Lee-Jackson Day Rally, that honors the Civil War leaders on the weekend before Martin Luther King’s Birthday.

Those militias include the Heirs to the Confederacy, the League of the South and a newer group, the United Confederates of the Carolinas and Virginia, said Dr. Squire, the professor who follows online chatter.

Leaders of various chapters of the Light Foot Militia, including from Pennsylvania, South Carolina and New York, said they also planned to be in Richmond. Some were banned from Charlottesville after the “Unite the Right” rally there.

Richard B. Spencer, one of 24 defendants in a lawsuit over the rally in Charlottesville, told Alex Jones, the founder of Infowars, that he might join him in Richmond, but it was unclear whether either would show up.

Timothy Williams reported from Richmond, Adam Goldman from Washington and Neil MacFarquhar from New York.