Snapchat
A portrait of the Snapchat logo in Ventura, California Reuters

If you murder someone, best not to take a selfie with the body. That's what 16-year-old Maxwell Marion Morton found out the hard way. He was charged Friday with killing a classmate, the Pittsburgh Tribune-Review reported.

Morton, a resident of suburban Pittsburgh, was charged after posting a photo of himself with the body of classmate Ryan Mangan on messaging app Snapchat. Morton is currently being held without bail in the Westmoreland County juvenile detention center and being charged with first-degree murder, homicide and possession of a firearm by a minor. He was arraigned Friday and is expected to be charged as an adult.

Mangan’s mother found her son Wednesday in their home and reported to authorities he had been shot.

Morton allegedly took a photo of himself with the body and put it on Snapchat. He then sent the photo to a friend. Though Snapchat photos are meant to disappear after a short time, his friend saved the photo and sent it to police.

Police confirmed the photo depicts Mangan’s body as he was found at the scene.

“I've never seen it before,” District Attorney John Peck told the Tribune-Review, addressing the use of Snapchat to apprehend Morton. “But it was a key piece of evidence that led investigators to the defendant.”

Morton confessed to the crime after police found a 9 mm handgun in his home on Friday.

“[Police] received a copy of the photo which depicted the victim sitting in the chair with a gunshot wound to the face,” a police affidavit stated. “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’s text messages also allegedly read, “Ryan was not the last one.”

Police are still investigating a motive.

Using online photographs and messages as evidence in criminal cases has become increasingly popular in recent years.

In 2012, tweets, photos and text messages were used as evidence in an incident in Steubenville, Ohio. Two high school football players were found “delinquent beyond reasonable doubt” in the rape of an underage female in August.