South Carolina police officer Quincy Smith bought his own eyeglass-camera on Amazon to help record his interactions with the public during his shift.
He would later call it the best 30 bucks he ever spent.
The footage would record a vital piece of evidence that helped put away the man who shot the officer four times, breaking bones in both his arms and severing a vein in his neck.
Chilling video shows the New Year's Day 2016 encounter in close detail.
Smith was responding to a report of a man trying to steal items from customers at a convenience store.
He came across a man, later identified as Malcolm Antwan Orr, who matched the suspect's description. Orr was walking with his back to the officer and one hand holding a cellphone to his ear.
The video shows Smith repeatedly yelling at Orr "Take your hands out of your pocket! Take your hands out of your pocket! If you don't stop I'm gonna tase you."
At that point, the video shows Orr quickly drawing a 9mm handgun and firing multiple times - even as he kept the cellphone to his ear with his other hand.
Smith is seen falling to the ground and screaming, "Shots fired!"
Officials say Orr fired eight times, hitting Smith with four bullets. Some of the shots came as he was already wounded on the ground.
In the recording, Smith's voice can be heard telling a police dispatcher: "Tell my family that I love them."
The officer survived, but the bullets severed a vein in his neck and shattered bones in both of his arms.
Smith's video helped convict Orr on attempted murder charges.
Orr was sentenced Thursday to 35 years in prison.