Fresno County sheriff's deputies say it happened just after 12:30 p.m. Sunday near Firebaugh at a home on the 600 block of Fairfax Avenue.
According to officials, they received reports that the child suffered from an accidental gunshot wound to the chest.
"CPR was done but it was determined the child passed away the investigation started. there were only two people on scene when deputies arrived but were still investigating it its looking to be an accidental shooting," said Sgt. Mike Nulick.
A preliminary investigation indicates the boy and his friend were playing with the firearm. Deputies say the children were unsupervised when the gun went off.
It is unclear who the gun belongs to, the homeowners or the parents of the boy who was visiting.
Absolutely heartbreaking. We’re in Fresno County where sheriff’s deputies and crime scene investigators are looking into the accidental shooting death of a 12-year-old in Firebaugh. @ABC30 pic.twitter.com/WfAS7MSuMZ— Vanessa Vasconcelos (@VanessaABC30) February 4, 2019
Investigators say the gun owner could face criminal charges if it is determined that the firearm was not properly stored.
Homicide detectives are en route to interview the other child that was with the victim. Deputies say this is protocol when a child is involved in a firearm death.