(Reuters) - A Pennsylvania teenager was in custody without bail on Monday, accused of fatally shooting a 16-year-old classmate in the face and taking a photograph of himself with the body which he sent to another boy's cellphone, according to court documents.

Maxwell Marion Morton, 16, is accused of shooting classmate Ryan Mangan at Mangan's home in Jeanette, a suburb of Pittsburgh, on Wednesday. Mangan's mother discovered the boy's body upon returning home that evening, according to a police affidavit.

Morton used his cell phone to snap a picture of himself with Mangan's body slumped in a chair in the background, the affidavit says. Morton then sent the "selfie" to another boy's phone using the messaging software Snapchat.

A typical Snapchat message disappears within a few seconds of being opened, but the recipient was able to save it and show it to his mother, who called the police on Thursday, according to the affidavit.

Police searched Morton's home on Friday and found a 9mm handgun stashed under the basement steps. A spent 9mm shell casing was found at the crime scene. Morton confessed to the police that he killed Mangan, the affidavit said. Investigators have not said what they believe Morton's motive to be.

Morton was arraigned as an adult in magisterial district court in Westmoreland County on charges of criminal homicide, first-degree murder and criminal possession of a gun. Judge Joseph DeMarchis denied him bail.

It was not clear whether Morton had a lawyer. He is due back in court for a preliminary hearing on Feb. 19.

Police also searched Mangan's phone, and found a picture of Mangan holding a semi-automatic handgun, the affidavit says.

(Reporting by Jonathan Allen; Editing by Sandra Maler)