MIDDLETOWN, Conn. (WTNH) — A 16-year-old boy was arrested on Wednesday after he accidentally shot himself with a ghost gun in Middletown.

Officers responded to Ferry Street on Nov. 2 to investigate a report of a shooting and found the teen with serious injuries from a gunshot wound. He was taken to Hartford Hospital where he underwent surgery.

During an investigation, officers found that the juvenile did not live at the residence where the shooting occurred. According to police, the 16-year-old was handling the ghost gun and accidentally shot himself.

At the time of the shooting, police said the 16-year-old was near a 7-year-old inside the home. According to police, the 16-year-old also tried to conceal the gun before police arrived.

Police arrested the juvenile on Wednesday and charged him with criminal possession of a firearm, carrying a pistol without a permit, illegal discharge of a firearm, failure to obtain serial number (firearm), first-degree reckless endangerment and risk of injury to a minor.

The teen was given a court date and released to a parent on a court-set promise to appear.