Across the country, municipal governments have signed contracts with police unions including provisions that shield officers from punishment for brutal behavior as well as from legitimate complaints by the citizens they are supposed to serve.

That may soon change, as public outrage over police killings of civilians is ratcheting up pressure on elected officials to radically revise police contracts that make it almost impossible to bring officers to justice.

The most striking case in point is Chicago, which has been roiled by a police scandal stemming from a cover-up in the case of a 17-year-old named Laquan McDonald, who was executed by a police officer nearly two years ago.

The Police Department first claimed that Mr. McDonald was brandishing a knife and moving toward officers when he was killed. A video — probably available to the city within hours of the shooting but not made public until last November, more than a year later — showed that Mr. McDonald was moving away from the cops when they shot him 16 times, and that the police were obviously lying.