Image copyright Pittsburgh Tribune Review Image caption Police say Maxwell Marion Morton was tracked down after his Snapchat post and later confessed to the killing

A US teenager has been charged with the murder of a classmate after police said he posted a Snapchat photo of himself with the victim's body.

Maxwell Marion Morton, 16, was arrested for killing Ryan Mangan in his home near Pittsburgh, Pennsylvania.

The suspect used Snapchat - an app that auto-deletes content after a few seconds - to send an image to a friend.

The friend took a screenshot and his mother contacted police. Prosecutors said the Snapchat was "key evidence".

"[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 states, according to The Pittsburgh Tribune-Review.

"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."

Image copyright GoFundMe Photo Image caption The victim, 16-year-old Ryan Mangan, was a classmate of Maxwell Marion Morton

The boy also received text messages from the suspect saying: "Told you I cleaned up the shells" and "Ryan was not the last one."

Snapchat has become wildly popular among US teenagers and youth, with many attracted by the fact content shared via the app disappears so quickly.

But there are ways to make Snapchat messages permanent - including taking screen captures and using third-party services.

Users are alerted when someone takes a screen capture of a message.

Maxwell Marion Morton confessed to killing Mr Mangan after police found a 9mm handgun hidden in his home, according to The Tribune-Review.

He will be charged and face trial as an adult, police said.