Protesters and police clash on the streets on Jan. 20, 2017, in Washington. (Jahi Chikwendiu/The Washington Post)

“SOMETIMES THE bad guys win.” That was the reaction of D.C. Police Chief Peter Newsham to the decision by the U.S. attorney’s office to drop the last of the rioting cases stemming from controversial arrests during President Trump’s inauguration. If the chief’s judgment is correct, his department must bear part of the responsibility, and it should learn some lessons for managing future protests and disturbances.

Within days of the decision by federal prosecutors to dismiss charges against the final 39 defendants who were awaiting trial, an independent review of the police response to the events of Jan. 20, 2017, was released. The report by the nonprofit Police Foundation praised the department for its professionalism in handling numerous demonstrations throughout the city, effectively balancing public safety and First Amendment rights, but it faulted police as unprepared to deal with violence that broke out near Franklin Square. More than 200 people were arrested, and the report contends that some demonstrators not involved in destructive behavior got caught up in an indiscriminate police response.

That a riot occurred is without question. There was more than $100,000 in damage to private and public property, and 21 people pleaded guilty to charges for their conduct that day, including one to a felony offense. But most of the cases were dismissed after prosecutors at two trials failed to win convictions because they couldn’t tie suspects to specific acts of violence or convince juries that the defendants’ actions enabled others to engage in violence.

The department’s internal review of its action has yet to be made public, and a pending federal lawsuit alleging mistreatment and unlawful arrest of several demonstrators means there is still more to be learned about the events that day. But the Police Foundation report raises important questions about the actions by police and the decisions by prosecutors to pursue charges. “Guilt-by-association policing” was the characterization of Scott Michelman, an attorney for the American Civil Liberties Union, which filed the Inauguration Day lawsuit. It is disturbing not only that innocent people may have been wrongly treated, but also that there is the possibility that some of those who committed violence got away with it.

Mr. Newsham has called the Inauguration Day protests “unique,” but it’s likely there will be other, perhaps even more challenging, disturbances in the future. “As some groups and individuals continue to identify ways to leverage social media and anonymity to commit criminal acts within the context of First Amendment assemblies,” the foundation report concluded, police “. . . must continue to develop and implement strategies and tactics that protect persons exercising their First Amendment rights, respond to criminal acts, and ensure the public’s safety.”