A still frame from a D.C. police officer's body-worn camera at the scene of a standoff and fatal shooting of Sherman Evans, 63, on Varnum Street NE on June 27. (DC Police)

A WEEK before the country was roiled by police shootings of black men in Louisiana and Minnesota, D.C. police shot and killed a 63-year-old man in front of his home in Northeast Washington. Investigation of the death is ongoing, with questions still to be answered. But because much of the incident was captured by police body cameras — with the footage released to the public in a timely way — D.C. officials have gone a long way toward reassuring residents about the accountability of their police force. That should serve as a lesson to other police departments that want to build public trust.

Video from June 27, when Sherman Evans was shot after police said he raised a weapon, shows tense moments as police tried to get him to drop a gun. “Drop the gun! Drop the gun!” are the first words from one police officer who responded to a 911 call. Then for the next seven minutes: “Come on, sir! Put it down. We’ll talk. We’ll talk” and “Just stay there, bro” and “Drop the f---ing gun.” The video doesn’t directly show the shooting, although shots can be heard. Police believe Mr. Evans, who reportedly had suffered from depression, made the 911 call; the gun was later determined to be a pellet gun.

Mayor Muriel E. Bowser (D) ordered release of the video under rules that give the mayor the discretion to release body-camera footage on a case-by-case basis in matters of significant public interest and after consultation with the police chief and U.S. attorney. It was the first time footage of an officer-involved shooting was released since police began using body cameras last year. Though the head of the police union criticized release of the tape before completion of the investigation, Ms. Bowser was right to recognize and respond to the public’s legitimate demand for information.

It will be important that the city be equally forthcoming if cases occur in which video footage is damning of police conduct. Cities such as Chicago learned the hard way the fallout of withholding video; and with cellphones so ubiquitous, chances are someone else (as was the case in recent police shootings in Baton Rouge and near St. Paul) will have recorded a video that they will release. The Fresno, Calif., Police Department on Wednesday released footage of officers fatally shooting a 19-year-old man last month in the wake of outrage caused by release of a witness’s cellphone video that didn’t show precipitating events before the shooting.

Body cameras and the policies governing release of videos are still in development, and departments across the country are grappling with issues of privacy, costs and technology. What authorities need to realize is that the cause of improving accountability, transparency and public trust is undercut when footage is not released, sending the message that there is something to hide.