SEATTLE — THE police killings of Alton Sterling and Philando Castile, and the sniper killings of Dallas police officers are terrible reminders that the disconnect between American citizens and the police officers hired to protect and serve them is greater and increasingly deadly. That is why, as the Cleveland Police Department prepares for next week’s Republican National Convention, it must take special precautions to avoid clashes inside and outside the convention hall.

Groups opposed to the presumptive Republican nominee, Donald J. Trump, have vowed to fill the streets outside the convention site, the Quicken Loans Arena. Mr. Trump has himself predicted rioting if he is somehow denied his party’s nomination, encouraged his supporters to get into fistfights with his detractors and hinted that he’d punch a protester if given the opportunity. Some of his supporters are also vowing to carry weapons to demonstrations and other events outside the convention hall. (Ohio is an open-carry state, but guns will not be allowed inside the arena.)

There are good and bad ways for handling big events where both security threats and peaceful demonstrations are in play. I can tell you all about the wrong ways because I was the police chief in Seattle during the 1999 protests against the World Trade Organization, which became known as the Battle in Seattle.