Local prosecutors have historically paid no price for taking up residence in the pocket of the police department. That changed on Tuesday, when Democratic primary voters in the counties that include Cleveland and Chicago turned veteran prosecutors out of office for mishandling cases against police officers who shot and killed black citizens.

The defeats of Anita Alvarez, the state’s attorney of Cook County, Ill., and Tim McGinty, county prosecutor of Cuyahoga County, Ohio, show that many voters are no longer willing to tolerate cover-ups and foot-dragging in cases of killings by the police and other abuses. Still, it will take more than changing the name on the prosecutor’s stationery to reform the way such cases are handled.

That prosecutors and police officers work closely together every day creates a conflict of interest. It makes it difficult for many prosecutors to vigorously pursue cases of police wrongdoing. The best solution would be to bring in special prosecutors to handle all cases where civilians died at the hands of the police. Until that happens, voters need to oust prosecutors who fail to do their jobs.

Ms. Alvarez became the object of civic rage when she waited 13 months to charge the police officer who executed 17-year-old Laquan McDonald on a busy Chicago street — despite a police dash-cam video that contradicted the Police Department’s statement that the young man had been menacing officers with a knife.