A public defender discovered video footage from a Baltimore police officer’s body camera showing him planting drugs at a crime scene, according to the Baltimore Sun. In the video from January 2017, officer Richard Pinheiro is seen planting a plastic bag of pills amongst trash in an alley.

The footage is from a January drug arrest. It shows an officer placing a soup can, which holds a plastic bag, into a trash-strewn lot. The officer can then be seen walking to the street, where he flips on his body camera. “I’m gonna go check here,” the officer says. He returns to the lot and picks up the soup can, removing a plastic bag filled with white capsules.

This footage was caught because of a handy feature in the police body cam: the last 30 seconds of footage captured before the police officer turns on the camera are automatically saved—without audio.

x Footage shows officer placing drugs in trash; goes out to street, turns on camera, returns. Cams save 30 sec prior to activation, w/o sound pic.twitter.com/5ZW128lWFM Ã¢ÂÂ Justin Fenton (@justin_fenton) July 19, 2017

The defendant’s attorney found the footage just in the nick of time—it was the night before the trial. The case resulted in a not guilty verdict. A rep from the Baltimore State Attorney’s Office told Buzzfeed News that the public defender’s office is seeking a review of all cases related to the three officers related to the case.