Cooper was sent to a juvenile detention center, police said.
CNN  — 

The 16-year-old Pennsylvania boy who allegedly confessed over Instagram video chat to killing a young girl told police when he was taken into custody that “it was an accident,” according to a criminal complaint.

Police in Bensalem, Pennsylvania, responded Friday afternoon after a girl reported receiving a video call and text messages from Joshua Cooper in which he allegedly told her he had killed someone and asked for her help disposing the body, the complaint said.

When police arrived at Cooper’s home in response to the report on the video chat, they saw a young man, who authorities believe to have been Cooper, running out the back of the residence, the complaint alleges.

The 13-year-old victim, whom authorities say was identified by her family based on the jewelry she was wearing, was discovered by police inside the residence with a “large caliber” gunshot wound to her chest, the complaint said.

Cooper was later located and arrested. As he was being taken into custody, the complaint alleges the suspect was making “unsolicited utterances,” saying he was “sorry” and that he’s “going to jail for the rest of [his] life.” He was denied bail on several adult charges, including criminal homicide, and sent to a juvenile detention center, police said in a statement.

CNN is working to locate an attorney for Cooper.

In an interview with detectives, Cooper allegedly said he had spent the afternoon with the victim in his home watching a Netflix series, the complaint said. The suspect said he and the victim had a previous relationship, the document said.

The complaint also alleges that Cooper said he accessed his father’s safe earlier that day, opening it by reinserting the batteries that his father removed, which made the combination lock inoperable. He told detectives that he was sorting ammunition and removed, reorganized and replaced the firearms that were in the safe, the document said.

Cooper and his mother allegedly “terminated” the interview with the detectives before it was completed, according to the complaint.

Cooper is next scheduled to appear in court on December 7th, according to the Bucks County District Attorney’s Office.

Bensalem is a township in Bucks County of around 60,000 residents, a half hours’ drive north east of Philadelphia.