Kai Kloepfer, a 17-year-old high school student from Boulder, Colorado is developing a smart gun that works by reading the fingerprint of the holder, Tech Crunch reported.

The teen came up with the idea in 2012 shortly after a mass shooting inside a movie theater during a screening of "The Dark Knight Rises" in Aurora, Colorado.

At that time, he was trying to come up with an idea for a school science project. But like other Colorado residents, he couldn't get his mind off the unfortunate incident.

"The idea came to me right as I was falling asleep," he said. "It was kinda in the back of my mind because of the shooting."

"I scribbled it down before I went to bed and fell asleep and then in the morning I began my research," he added.

Kloepfer's invention works through sensors located in the pistol grip. The sensors create a user ID which only responds to the owner's fingerprint. In other words, the gun can only be used once it's in the hands of the authorized user, according to The Verge.

The gun can also be programmed by the owner to identify the fingerprints of other people as long as permission has been granted.

In addition, to prevent the biometric system of the gun from being hacked, the user data is stored inside the firearm and does not use online storage networks.

Kloepfer hopes his invention can significantly reduce gun-related deaths.

"Every 30 minutes in the U.S. a kid dies from a gun," he said. "I want my gun to help reduce accidental deaths and injuries and to prevent tragedies."

His smart gun technology recently won $50,000 from the Smart Tech foundation's Smart Tech for Firearms Challenge, The Blaze reported.

With the money, Kloepfer was able to purchase a 3D printer for the creation of parts for his prototype. Kloepfer plans to use the rest of his winnings to further develop the gun's fingerprint scanner.