Maxwell Marion Morton
Maxwell Marion Morton, 16, allegedly sent a 'selfie' posing next to the body of classmate Ryan Mangan on SnapchatSnapchat

Police in Pennsylvania have charged a 16-year-old with the murder of his classmate after seeing a "selfie" apparently taken by the teenager posing with the body of the victim.

Maxwell Marion Morton, is charged with shooting Ryan Mangan, also 16, in the face at his home near Pittsburgh.

Police say Morton sent a selfie via Snapchat to a friend. Snapchat images usually delete after a few seconds but the recipient is believed to have taken a screenshot and saved it. The boy's mother called the police.

The photograph showed Morton next to Mangan's body, which was positioned exactly as it was discovered by the victim's mother. The suspect also allegedly sent text messages saying "Told you I cleaned up the shells" and "Ryan was not the last one."

A police affidavit stated that police "received a copy of the photo which depicted the victim sitting in the chair with a gunshot wound to the face. 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."

Prosecutors have described the picture as "key evidence." County district attorney John Peck told the Pittsburgh Tribune-Review it was the first time in his 30 year career he'd come across such an event. "I've never seen it before, but it was a key piece of evidence that led investigators to the defendant."

When police went to arrest Morton they found a discharged 9mm handgun hidden in the basement which is undergoing forensic tests. Having confessed to the killing he is now being held without bail in a juvenile detention centre and has been charged as an adult with first-degree murder, homicide and possession of a firearm by a minor. A preliminary hearing will take place on 19 February.

At a school vigil attended by hundreds of fellow students Mangan was described by his head teacher as a "bright light".

Apps like Snapchat are popular because anything sent usually auto-deletes, but messages and photographs can easily be saved using screenshots or third-party software.