GREENSBURG, Pa. — An 18-year-old man who authorities say shot a friend and then posed for a selfie with the dying teen has been convicted of a less serious charge.

Maxwell Morton was convicted Thursday of third-degree murder in the shooting of 16-year-old Ryan Mangan in February 2015.

The Westmoreland County jury deliberated six hours before rejecting prosecutors’ arguments that Morton intentionally killed Mangan.

Morton testified Thursday that the teens were playing with a handgun and he thought it was not loaded when he pointed at Mangan and pulled the trigger.

He said he took the selfie to document what happened and said he planned to kill himself.

Morton testified that people think that he’s a monster, but that he’s actually a “chill kind of guy.”

At times, he broke down in tears while describing his friendship with Mangan and the details of his death.

Morton displayed little emotion as the verdict was announced, but defense attorney Pat Thomassey said his client was pleased.

“He’s out from under a possible life sentence. The poor kid did a lot of stupid things that we had to overcome at trial,” Thomassey said.

Morton faces up to 40 years in prison when he is sentenced in May.

Mangan’s parents declined to comment as they left the courtroom.

Earlier this week, jurors were shown the selfie during testimony from a Springville, Wisconsin, teenager who said Morton bragged about the killing as they played an online video game that evening, saying he “got his first body.”

The teen said he thought it was a prank until Morton texted a link of a news item about the death and sent the selfie via Snapchat. The message was followed with a text that said, “Told you,” he testified.

The teenager said he immediately took a screen shot of the selfie and told his mother, who called police in Pennsylvania and testified she told authorities, “you probably won’t believe this, but we have a Snapchat of the murder.”

A forensic pathologist testified Wednesday that Mangan didn’t die immediately and “would have survived with appropriate medical care.”