JACKSONVILLE, Fla. – A 2-year-old boy underwent surgery and was recovering at a hospital Wednesday night after he accidentally shot himself inside a Westside home, according to his family.

Family members identified the toddler as Elijah Datson, who will turn 3 next month.

According to the Jacksonville Sheriff's Office, the boy was shot Wednesday afternoon at a home on Whisper Glen Drive North, just off Old Middleburg Road South in the Jacksonville Heights South area.

Police said the child was taken to UF Health Jacksonville and the injury was not life-threatening.

A source told News4Jax that the child was handling a gun and shot himself in the arm. Though there's no word on how the boy gained access to the gun or who the firearm belonged to, relatives said the child likely thought he was playing with one of his toy guns when he shot himself.

Neighbors said they were upset to hear about another child being injured after playing with a loaded gun.

"It's heartbreaking not only for the child, but for the parents as well," said neighbor Bobbi Johnson. "What happened to all the locks you're supposed to have on your weapons and have them put up? I don't understand. It's sad. It's so sad."

Family members told News4Jax the toddler's cousin, who was babysitting him at the time, is now in police custody. Her name has not been released by police.

News4Jax crime and safety analyst Gil Smith said this could be a case of culpable negligence.

"When it comes to culpable negligence with a firearm, it must be proved that the accused left the firearm within reach or had some kind of access to the firearm by the child," Smith said.

According to experts, gun locks and a gun safe are good ways to prevent children from injuring themselves.

This is the fourth shooting of a young child in Jacksonville this year, including the accidental shooting of a 5-year-old boy last Sunday inside a home less than 3 miles away. That child survived, but his condition was never released.