Anita Alvarez lost her bid to run again as the Democratic nominee for Cook County, Ill., state’s attorney. (Teresa Crawford/Associated Press)

The writer is a student at Harvard Law School.

Last month, citizens seeking police accountability in two U.S. cities won remarkable victories at the ballot box. In Cuyahoga County, Ohio, prosecutor Timothy McGinty was ousted by Democratic primary voters outraged by the failure to bring charges against the officer who shot and killed 12-year-old African American boy Tamir Rice in a Cleveland park. In Cook County, Ill., State’s Attorney Anita Alvarez lost her bid for the Democratic nomination for a third term over her handling of the police shooting death of teenager Laquan McDonald.

As the United States faces a crisis of faith in the criminal justice system’s ability to hold police officers accountable under the law, attention has turned to the role of prosecutors. These two electoral expulsions have been hailed as milestones in the struggle to inject accountability into the United States’ local law-enforcement infrastructure.

It is unfortunate, then, that some activists seem intent on making those hard-fought victories irrelevant.

That’s not their intention, of course. Reformers want to solve a problem that can genuinely taint investigations of police officers: the close working relationships between local police and prosecutors, which can lead to biases, intentional or otherwise. Even if local prosecutors put aside those relationships and act as perfect arbiters of justice, the perception of favoritism can linger and erode the public’s faith in the rule of law.

Protests continued on Dec. 9 in Chicago, as people took to the streets to protest the death of Laquan McDonald, a 17-year-old black teenager. McDonald was shot and killed in 2014 by a white police officer, and protestors are calling for Mayor Rahm Emanuel and state's attorney Anita Alvarez to resign. (Victoria M. Walker/The Washington Post)

Recently, that erosion has been on full display in the streets of Ferguson, Mo. And Staten Island, N.Y. And Cleveland. And on and on.

The proposed solution: replace local prosecutors with independent, special prosecutors in police abuse cases. Many in the Black Lives Matter movement are for it. The Post is for it. Statehouses around the country have begun moving toward it.

And yet, future generations of reformers will look back in amazement at how easily well-intentioned advocates embraced a misguided, counterproductive policy that ceded local control over police accountability.

The crisis of faith in the criminal justice system is real, as is the inherent tension between cooperating with local police one day and prosecuting them the next. Completely removing that tension, however, would also mean needlessly crippling the political measures that local communities are beginning to use to force accountability.

In the United States, almost all prosecution is local. Voters in all but three states directly elect their local prosecutors. That gives voters tremendous leverage over how prosecutors perform their duties, including the investigation of police misconduct. While that leverage has been chronically underutilized in the past, the two recent victories demonstrate that elections for local prosecutor positions can be real, robust campaigns if voters are galvanized.

What would scuttle this promise of accountable criminal justice, just as it is beginning to be realized? Neutering the power of directly accountable prosecutors and handing it off to “independent” officials far removed from local communities.

Special prosecutors do not grow on trees. They come from somewhere. They are appointed by someone. And that someone does not always share the goals or interests of local reformers working to hold police accountable. In 1996, for example, then-New York Gov. George Pataki (R) stepped in to replace the Bronx district attorney because Pataki feared he would not seek the death penalty for the killer of a police officer.

More recently, look no farther than Michigan, where local officials and activists decry the usurpation of key policy decisions by unelected, state-appointed emergency managers. This is not a model to be followed. A local community must always have electoral recourse if citizens do not think a prosecutor is doing his or her job — especially when that job is to prosecute police misconduct.

This does not mean communities have to wait until an election to address a lack of police accountability. A system of checks could involve a provision allowing for use of a special prosecutor after an elected local prosecutor first has had a chance to investigate and act.

We have had elected prosecutors in this country for more than 150 years. Reformers are just beginning to realize that this is a system that can work to the benefit of local communities by offering an avenue both to elect reformist prosecutors and to punish those who stand in the way of accountability. If more election victories follow those in Ohio and Illinois, prosecutor elections could turn out to be the very tool that spreads smart crime policies across the country — and not just in the area of police accountability, but also on drug and gun enforcement and mass incarceration. Now is not the time to take such a powerful lever out of the hands of the people.