Americans were shocked by more than the hate speech at a Unite the Right demonstration in the university town of Charlottesville, Virginia, this August. Also unsettling for many was the sight of the fatigue-wearing men carrying AR-15 rifles who descended on the city to form protective perimeters around the white nationalists for the stated purpose of protecting the protesters’ free speech. Governor Terry McAuliffe later claimed that police held back from intervening in the clashes that ensued, and left one dead, for fear of sparking a confrontation with the militias.

Now, after torch-carrying racists marched once more in Charlottesville earlier this month and the well-known white nationalist Richard Spencer vowed more demonstrations there, the city is asking courts to stop the groups from coming back.

A lawsuit filed today argues that gun-toting militias, organized hate groups sporting weapons, and the leftist self-defense organizations who squared off against both all constituted paramilitary organizations, which are banned by the state. It cites three different laws — one in the Virginia state Constitution, along with two parts of the state criminal code — that specifically bar unregulated militia activity.

In addition to those state laws, the city is invoking Supreme Court precedent, including a 1982 case pitting a group of Vietnamese fisherman against members of the Ku Klux Klan in Texas, whose members had terrified the immigrants. In that ruling, the high court held that “the proliferation of private military organizations threatens to result in lawlessness and destructive chaos.”

Through the suit, Charlottesville asks the court to prevent the return of the militias and hate groups. “Without such relief,” the plaintiffs claim, “Charlottesville will be forced to relive the frightful spectacle of August 12: an invasion of roving paramilitary bands and unaccountable vigilante peacekeepers.”

The plaintiffs, which also include various Charlottesville businesses, allege that the behavior of the militias and hate groups was not speech protected by the First Amendment or self defense protected by the Second Amendment, but rather an attempt to intimidate and violently harass others:

“These vigilante militia members (Militia Defendants) carried assault rifles as they patrolled the sidewalks in combat boots, military-grade body armor, and, in most cases, camouflage uniforms. They were equipped to inflict massive harm upon a moment’s notice from their commanders. Whatever their stated intentions, these groups terrified local residents and caused attendees to mistake them for authorized military personnel. In reality, they answered to no governmental authority, and their activity draws no support from the Second Amendment, which protects an individual right to self-defense and extols the virtues of a ‘well regulated Militia,’ while creating no right to form unregulated private armies or private peacekeeping forces.”

The suit may be the first of its kind in decades. Mark Pitcavage, an expert on extremism with the Anti-Defamation League, wrote on Twitter, it was “to my knowledge the first use of such a lawsuit since the early 1980s.”

In addition to the complaints against self-designated militias like the Three Percenters, the suit alleges that the white-nationalist groups at the center of the August 12 rally also acted not as lawful demonstrators, but as private military organizations, clad in uniforms of polos and khakis and equipped with shields and melee weapons.

The city’s argument zeros in on the white nationalists’ extensive preparations for combat:

“Several white-nationalist organizations came to Charlottesville to fight. Applying techniques developed well in advance, affiliated bands of alt-right warriors used clubs, flagpoles, and shields to batter their ideological opponents. Sporting matching uniforms and weaponry — and with command structures to coordinate their actions—they functioned as paramilitary units. These paramilitary organizations and their leaders (the Alt-Right Defendants) wielded their weapons on August 12 not “as individuals” exercising their Second Amendment rights to self defense, but “as members of a fighting force.”

If successful, the suit could provide a model for other cities beyond Virginia wishing to keep protests free of guns. Before the August rally, a state pre-emption law that prevents localities from making their own gun regulations blocked Charlottesville from prohibiting firearms at the event. As The Trace reported in August, Virginia is one of 36 states where laws require cities to allow guns in some form at protests.

But 28 additional states also, like Virginia, have another set of laws allowing governments to regulate unauthorized military groups, according to an analysis by attorneys at Everytown for Gun Safety, a donor to The Trace. That means that even though cities in many states may not be able to implement blanket bans on gun-carrying protesters, they may be able to take action against the organized, heavily armed groups whose presence may chill the speech of counter protesters, terrorize bystanders, and inhibit law enforcement’s ability to keep confrontations from spiraling out of control.

Pitcavage noted that it is hard to judge the strength of all the suit’s allegations. Militias have kept to themselves for the last several decades, and have rarely ventured into crowded towns and cities. Until the Trump era, cities now contending with white nationalists and armed extremists had little need to enforce the laws that Charlottesville’s suit will test.

Here’s the full suit.