St. Paul officials made a hard but fair decision Monday to charge demonstrators with third-degree riot — a gross misdemeanor — after a Saturday protest of Philando Castile's death at the hands of a police officer morphed into a prolonged freeway closure and confrontation that left 21 officers injured, one seriously.

The decision to charge does not impede First Amendment free speech rights, but it does send an unmistakable message that when protest veers into violence and blatant lawbreaking, there will be consequences. As the Star Tribune Editorial Board has said before, the "occupation" of freeways must come to a halt. Such reckless excesses do the movement no good, and the ensuing, hourslong, nighttime standoff set the stage for the reprehensible violence that followed, whether protest leaders take responsibility for it or not.

The organizers of Black Lives Matter must, if their movement is to mature, be prepared with plans to deal with such predictable situations. It is not enough to throw one's hands in the air and blame "outsiders." Officers issued 20 warnings to vacate the freeway or face arrest. At that point, demonstrators had a choice to make. As St. Paul Police Chief Todd Axtell put it, "When police officers come under attack, and we continue to give orders to get away, it's a dangerous situation."

If those hurling rocks, bottles, debris and fireworks were, in fact, unknown to protest organizers, Black Lives Matter leaders could have called a halt to the protest at the first sign of violence and regrouped the next day.

The ongoing protests in front of the governor's residence have been much more peaceful. But again, blocking Summit Avenue for days on end with sprawling, overnight encampments is unsustainable. At some point, St. Paul police are obliged, for the sake of those who live on that street, to open access.

Tackling racial equality is a monumental task, and those who undertake it must be prepared to build a strong, durable movement that is willing to work for real change over time.

Police and public officials must do their share, too. Most unhelpful was the churlish display by several Minneapolis police officers who contracted to provide security services for a Minnesota Lynx game, then walked off the job when team members displayed T-shirts that showed solidarity with Castile, Alton Sterling in Louisiana and the Dallas Police Department, which lost five members to a sniper last week. Worse still were the petty remarks of Minneapolis police union head Lt. Bob Kroll, who praised the officers for walking off and snidely added that only four had been needed because the women's basketball team was "a pathetic draw."

In all of this the issues are too serious, the stakes too high, for immature self-indulgence. Caring people on all sides of this debate must instead come together on whatever precious common ground they can find.