A Chicago teenager was charged on Sunday with first-degree murder in the death of his friend. Prosecutors say 17-year-old Anthony Mendoza published a Snapchat video in which he confessed to killing 16-year-old Christian Bandemer, who was fatally shot Friday after the boys handled a gun. The Chicago Tribune reported that police initially thought the shooting could have been an accident given the circumstances, but prosecutors say Mendoza should have known better than to play with a gun.

The shooting took place at 11:37 a.m. local time, according to the initial Chicago Police Department news release published Sunday. The shooting occurred when Bandemer, his yet unidentified 20-year-old cousin, and Mendoza were handling a firearm. Mendoza allegedly shot Bandemer when his cousin left the house to have a cigarette. The Chicago Tribune reported that Mendoza was granted bail of $250,000, though prosecutors requested he be held without bail. 

The Snapchat video, in which prosecutors claim Mendoza admits to committing the crime, was taken and published from the back of a police car following his arrest.​ In the Snapchat video, Mendoza says, "I killed Chris and now I'm going to kill myself," according to Cook County Assistant State's Attorney Anna Sedelmaier.

Upon setting bail, Cook County Judge Peggy Chiampas called the shooting "an absolute tragedy." Meanwhile, Mendoza's attorney called it an "accident," and added that Mendoza had "no animosity toward" Bandemer

The Cook County State's Attorney's office did not immediately reply to Complex's request for comment.