Fresno Police Chief Jerry Dyer announced that 35-year-old Oscar Ramos was charged with criminal storage of a firearm.
Chief Dyer said that investigators say that 2-year-old Jace Alexander was at home with Ramos, a family friend who lives in the house and with 22-year-old Jenna Moya, the fiancé of Jace's father.
RELATED: 2-year-old in Fresno dies from self-inflicted gunshot wound
The dad had left a couple of hours before the incident to go to work.
After making breakfast, the adults in the house left Jace in the living room to watch cartoons, and they went into the master bedroom for about 30 minutes to play video games.
WATCH: Chief Dyer's news conference on shooting
They heard a pop and found Jace in his bedroom severely injured. Moya asked Ramos to call 911, but after several minutes, he did not, and Moya grabbed the phone.
When officers and paramedics arrived, Jace was still breathing and rushed to Valley Children's Hospital, where he died a few hours later.
Ramos had a safe inside the house but left the loaded gun on an entertainment center Friday night.
RELATED: Police: 3-year-old toddler accidentally shoots pregnant mom in Indiana
State law requires that guns be secured whenever a child could access it.
Ramos could spend up to three years in prison if convicted of the crime.
Take a look at more stories and videos about gun safety here.