CHICAGO — Inside a cramped and worn courtroom, three white police officers are on trial in connection with the fatal shooting of a black teenager, Laquan McDonald. But these officers never fired their guns. Their crime, prosecutors say, was concocting a story to cover up for a colleague who did.

As prosecutors tell it, Chicago police officers shooed away eyewitnesses after the shooting on Oct. 20, 2014, and then made up a narrative to justify the shooting. They said in official reports that the teenager had tried to stab three officers, and that he had tried to get up from the ground as 16 shots were being fired into him.

The only hitch? Dashcam video footage of the encounter contradicted their account.

Patricia Brown Holmes, a special prosecutor trying the three officers on charges of conspiracy, official misconduct and obstruction of justice, told a judge last week: “Instead of serving and protecting all citizens of Chicago, the defendants tried to protect only one — Jason Van Dyke,” the police officer who was convicted this fall of second-degree murder in the shooting.

On trial along with the officers is the “code of silence” that police officers across the country have been accused of operating under. In Chicago, the issue has been around for decades, bubbling up in recent years in cases involving a drunk-driving officer, an off-duty officer’s beating of a bartender and a lawsuit by two police officers who said they faced retaliation after breaking the code.