(CNN) A 2-year-old boy died after accidentally shooting himself in the head at home in South Carolina, authorities said.

Officers responded to a call Thursday about a child who got a hold of a gun at home and shot himself, Greenville County Sheriff's Office Lt. Ryan Flood told CNN affiliate WYFF.

Deputies tried to provide medical aid to the child while waiting for EMS, but he died on the way to the hospital, Flood said.

The Greenville County coroner identified him as Kayden John Stuber, according to the affiliate , and ruled the cause of death as a gunshot wound to the head.