FOLLOWING GRAND jury decisions in Missouri and New York not to indict police officers Darren Wilson and Daniel Pantaleo, respectively, for the deaths of unarmed black men, many Americans believe the system is broken — that the failure to bring criminal charges in those cases was a miscarriage of justice. There is no easy answer to those perceptions, but there are things that states, which handle most criminal prosecutions, can do.

A sensible first step would be to establish automatic mechanisms to invoke a special prosecutor in cases where the police themselves are the suspects.

There are many ways to create such a system, plenty of ways it can misfire, and no guarantee that it will produce better outcomes than the status quo, under which local prosecutors handle cases where police are accused of abuses up to and including the unjustified use of lethal force.

At the least, though, special prosecutors can dampen or eliminate real and perceived conflicts of interest when a local district or state’s attorney prosecutes a law enforcement official.

Some prosecutors are loath to admit it, but the hand-in-glove daily working arrangements between police and prosecutors can flummox district attorneys trying to make impartial decisions about prosecuting officers. Beyond professional relationships, there is the question of politics: Faced with the risk of incurring the ire of police, or a union representing police, can district attorneys really discount the electoral consequences when deciding whether to prosecute? Even if they do, will anyone believe them?

This is not only a case of fixing the “optics.” The public’s trust is a prerequisite to the effectiveness of any criminal justice system. An erosion of confidence means the system itself is weakened.

Statutes and courts already confer special status on police, presuming that they are acting under “color of law,” or in the course of their official duties. When they abuse that privilege, as in cases where lethal force is needlessly deployed, it’s critical that it triggers a rigorous investigation and prosecution.

A special prosecutor stands a better chance of assuring that rigor. To handle police-committed crimes, states may establish a permanent special prosecutor’s office or empower the attorney general or some other official to designate a special prosecutor either from private practice or from another jurisdiction.

Perfect solutions are unlikely. In the absence of costly new cadres of permanent investigators (who may be underemployed most of the time), independent prosecutors may still have to rely partly or largely on law enforcement to investigate allegations of police misconduct. States may struggle to decide when an independent prosecutor should be triggered: Only in cases of lethal force? Or for other serious allegations of misconduct as well? In the end, there is no assurance that outcomes will differ.

Nonetheless, police and prosecutors themselves need the public’s trust to do their jobs; it is in their own interest to insist on a system that enhances that trust. Federal authorities should encourage the states to move in that direction.