See more of the story

Morally, the only proper reaction to last weekend's events in Charlottesville, Virginia, is outrage. Legally, the analysis has to be more nuanced. To help prevent further violence while preserving freedom of speech, we need to distinguish three categories, all of which seem to have been in play in Charlottesville: terrorism, peaceful protest and provocative action aimed at producing street violence.

The most horrifying is also legally the simplest. The car attack on peacefully assembled citizens was a terrorist act, modeled it would seem on Islamic State-inspired vehicle attacks in Europe.

It should be prosecuted as a federal hate crime, insofar as it can be shown to have been motivated by racial or religious prejudice. But that's not all. The car attack should also be prosecuted as terrorism, defined by federal law to cover acts of violence intended to affect the course of politics.

If it can be shown that the driver conspired with others, including members of white supremacist groups, they too can be prosecuted, even if they weren't specifically planning the car attack. That's the beauty of conspiracy law: You can be held liable for the acts of co-conspirators.

Peaceful protest is on the surface also legally simple. Under the standard set by the U.S. Supreme Court in the 1969 case Brandenburg v. Ohio, protesters in public places have the right to say whatever they want, no matter how horrifying -- provided that they don't intend to incite imminent violence in a manner that is likely to have that effect.

Even peaceful marches that are experienced by onlookers as intimidating are generally covered by this free-speech right. The Supreme Court has carved out a sort of one-off exception for cross-burning, which it held in 2003 could be criminalized when shown to be bound up in intimidation. But the court hasn't expanded that ruling.

That means a march through a public place, even accompanied by torches reminiscent of the old Ku Klux Klan, like the march through the University of Virginia campus, is constitutionally protected. The same is true of peaceful counterprotest. The words may be offensive and repulsive, but the content of the speech is sacrosanct.

The government may impose reasonable time, place and manner restrictions on such speech. That certainly includes requiring a permit to march. It has also been interpreted by the courts to allow local governments to ensure security by designating certain spaces for protest -- where potential antagonists can be kept at a distance. That has been controversial when police kept protesters far from political parties' national conventions.

But Charlottesville shows that keeping a safe distance between protesters and counterprotesters is all-important to keeping the peace.

That brings us to the hardest category, legally speaking: provocative speech that is aimed to produce conflict.

In a World War II-era case, Chaplinsky v. New Hampshire, the Supreme Court carved out a free-speech exception for what it called "fighting words." The idea was supposed to be that the government could criminalize speech that would provoke a reasonable listener into immediate retaliatory violence.

On the surface, the fighting words exception would seem to allow the police to arrest people who are in each other's faces, yelling epithets intended to provoke violent response. In fact, the man arrested in the Chaplinsky case called a police official a "damned fascist."

In practice, however, the courts are loath to invoke fighting words doctrine, which seems to contemporary ears to place the burden of avoiding violence on the speaker, rather than on the person who actually throws a punch. Consequently, it's very difficult for police departments to make arrests based on civilian provocation of other civilians.

What police can do is get between people who are trying to goad to each other into violence. And the moment anyone lays a hand on anyone else, an arrest can be made for disorderly conduct or assault.

This kind of policing is very hard, and it calls for careful judgment and officer training. When all sides are riled up, violence can start easily, and it can be very difficult to tell who started it, even with the benefit of ubiquitous video cameras.

The presence of legal guns at otherwise legal marches makes the difficulty of policing much, much greater. It's important to note that laws permitting open carry don't legalize intimidation by arms. They also don't allow the organization of military groups, like armed militia.

It's one thing to walk down the street carrying a gun. It's another to move in military formation as part of a maneuver designed to control space or to intimidate.

Police can and should be vigilant about the difference. They should use all the tools at their disposal to avoid fluid situations where protesters and counterprotesters are face to face, hurling insults and potentially coming to blows. Otherwise, there could easily be a tragedy in which someone opens fire.

The bottom line is that the First Amendment allows and must allow the police to keep the peace. Law and order is the baseline of liberal democracy. Without that, free speech is meaningless.

Feldman is a professor of constitutional and international law at Harvard University and was a clerk to U.S. Supreme Court Justice David Souter.