A 19-year-old man died early Tuesday after he was accidentally shot in the head in East Fort Worth, officials said.

David Earl Turner died just before 3 a.m. at John Peter Smith Hospital, hours after he was shot Monday night, according to Tarrant County medical examiner’s records.

Fort Worth police said the shooting took place about 6:30 p.m. in the 7400 block of Beckwood Drive. The shooter accidentally discharged a pistol, shooting Turner in the head, police said. Medics took Turner to the hospital in critical condition.

Police have the shooter in custody, and homicide detectives are investigating the incident, though police have said they believe it was an accident.