A Pennsylvania teen charged in the murder of his classmate led cops to his door by way of a selfie. According to prosecutors and police, Maxwell Morton shot Ryan Mangan in the face with a 9mm handgun, then took a photo of himself with his victim and sent the image to a friend via Snapchat’s messaging app.

Though the message was supposed to disappear moments after receipt, Morton’s friend saved the photo and his mother notified police.

Investigators have yet to release a motive for the killing though a social media footprint of the victim paints a picture of a young man involved with drugs, guns, and gang activity.

Several photos of the victim on Instagram show Mangan holding guns and flashing gang signs. In one captioned, “Let a n***a try me #Gang,” Mangan holds a shotgun. Another, posted just days before his murder, shows Mangan pointing a 9mm at the camera with the caption, “9 On Me #WhoSaidIAintOnShit.”

Morton’s social media presence was scrubbed by family members after the murder, according to friends of the alleged killer speaking on social media.

“(Police) received a copy of the photo which depicted the victim sitting in the chair with a gunshot wound to the face,” according to a police affidavit acquired by Triblive. “It also depicts a black male taking the ‘selfie,’ with his face facing the camera and the victim behind the actor. The photo had the name ‘Maxwell’ across the top.”Morton has been charged as an adult with first-degree murder, homicide, and possession of a firearm by a minor.

“I’ve never seen it before,” District Attorney John Peck told the Pittsburgh Tribune-Review of Morton’s gruesome selfie, “but it was a key piece of evidence that led investigators to the defendant.”The uniqueness of crime-selfies in Jeannette, a small town 20 miles east of Pittsburgh, notwithstanding, a number of criminals have recently taken to social media to incriminate themselves in increasingly violent attacks.

Tarod Thornhill, the 17-year-old suspect charged with shooting a member of a rival gang and two bystanders at a Pittsburgh mall over the weekend, tipped off investigators to his identity when the clothing in photos he posted of himself to Instagram hours before the crime matched the ones seen in the mall’s surveillance footage.

In December, cop killer Ismaaiyl Brinsley posted photos of his firearm with the caption, “I’m Putting Wings On Pigs Today,” to Instagram before he murdered two New York City police officers.

Chelsie Berry and Jared Prier of Missouri were charged with voluntary manslaughter and abandonment of a corpse in a friend’s drug overdose death last summer. High on meth and fearful of the police, the pair dragged their friend to the car and dumped his body onto a driveway. Police caught up with them after they posted a photo of themselves with the dead body to Facebook.

Self incrimination via social media has become so common that according to a 2012 survey, four out of five law enforcement officials used online networks like Facebook and Twitter during criminal investigations. It’s likely that figure has risen in the last three years.

“This is really a question about criminal pathology rather than technology,” Pamela Rutledge, a psychology and social media instructor at Fielding Graduate University in Santa Barbara, California told Triblive. “Perpetrators in need of validating their power and sense of self-importance have used all kinds of communications to ‘brag' about criminal activities—from the local hangout to social media, like Facebook.”

Indeed, before mobile phone selfies and the ability to instantly share them were even a thing, violent criminals have been documenting their misdeeds with whatever technology was available.

The BTK killer, who terrorized Wichita, Kansas for decades and received 10 consecutive life sentences in 2005 for each of his victims, took hundreds of polaroids of his crime scenes as well as a number of himself dressed in women’s stockings and bras.

In 2004, a Canadian gang took photographs of one another as they beat to death drug runner David Marniuk.

And from Steubenville to Halifax, young men have been charged with sexual assault only after photos of their assaults were captured and passed around via text message.

“One of the reasons people take selfies is self promotion; it’s to look good and gain social status,” said Dr. Keith Campbell, head of the Psychology Department at the University of Georgia, who has published research on the psychology behind selfies. “The other possibility is it’s a way of communicating or bonding with friends.”

But in this case, Campbell noted Morton used Snapchat—more a temporary instant messaging service where images are automatically deleted after a few seconds than a platform like of Facebook or Instagram.

Morton likely assumed there was some surety of anonymity by sending the gory image via a service that promises to make his message disappear in a snap.

“It’s not like a serial killer who wants the whole world to follow his crime. Using Snapchat wouldn’t be your choice if you wanted to whole world to see. He probably thought it would minimize the risk of being caught,” Campbell said.

Such faith in the security of the Snapchat app—which can be sidestepped with a screenshot or dozens of third party apps—was obviously misplaced.