In 2007, Massachusetts enacted a law that created a 35-foot buffer zone around entrances to abortion clinics. The state did so in response to episodes of harassment and violence, one involving a shooting rampage in 1994. That concern for public safety played heavily in the majority opinion of the U.S. Supreme Court last week, written by Chief Justice John Roberts, joined by the four liberal members of the court. The ruling struck down the law, yet it also left room for applying or crafting alternative state and local ordinances to ensure public safety outside the clinics.

Actually, the court ruled unanimously in overturning the law. Four conservative justices then broke with the majority over the reasons why it should be rejected. In a concurring opinion, Justice Antonin Scalia argued that the majority proved too timid, failing to see that the law is “unconstitutional root and branch.” Scalia deemed the result reached by the majority as unacceptable, as a misguided attempt to protect people on public sidewalks from speech they do not want to hear.

In his own concurring opinion, Justice Samuel Alito echoed the argument. He concluded that the law “blatantly discriminates based on viewpoint.”

The majority opinion agrees that the Massachusetts law goes too far in curbing speech, “sweeping in innocent individuals.” Yet it isn’t just speech, or the viewpoint, in play, a man or woman, say, approaching a woman entering a clinic to make a respectfully delivered argument against abortion. These instances have turned into confrontations, including angry voices, grim images of aborted fetuses and talk of God inflicting his wrath. As the chief justice reasoned, the trouble is the harassment, obstruction and, worse, violence.

In that way, the majority seeks middle ground. The chief justice noted that Massachusetts has “a variety of approaches that appear capable of serving its interests [public safety] without excluding individuals from areas historically open for speech and debate.” The majority even pointed the way. It reminded that laws can be written making it a crime to block entry to health-care clinics or to harass someone seeking to enter.

In many states and cities, there already are laws on the books that would apply to such situations and should be enforced.

Justice Scalia suggested that it is naive for the court majority to think that Massachusetts lawmakers were up to anything more than curbing speech. Yet the naivety is most apparent in his own argument, holding to the notion that all abortion opponents want is merely to have a quiet conversation.

A strong case can be made that those seeking abortions deserve a measure of privacy, that the anti-abortion cause hardly lacks vehicles or outlets for expressing its views. But privacy wasn’t the issue the high court engaged. Public safety was the topic, or, more precisely, how to strike an appropriate balance with principles of free speech. In that effort, the majority got it right.