KANSAS CITY, Mo. — Two weeks before Christmas and less than year into his law enforcement career, a young Kansas deputy found himself desperately trying to save a 3-year-old boy who had accidentally shot himself with an unsecured handgun.

Reno County deputy Andrew Nagel’s efforts were in vain, and Kaden Nagel, his son, died at the scene — one of four minors killed in accidental shootings in the state since 2014.

The gun belonged to the deputy’s roommate in a South Hutchinson apartment where Nagel was living while going through a divorce. Kaden wasn’t a frequent visitor there, and the gun’s owner thought he had taken the weapon with him when he left that morning.

Instead, it was in his bedroom and Kaden found it.

“I learned that sometimes it’s really not up to how careful you are but how careful people around you are,” Nagel told The Associated Press. “In my instance, I had my firearms put away and away from my son, but my roommate did not.”

Minors were involved in 16 accidental shootings in Kansas since 2014, four of them fatal, according to data compiled by The Associated Press and the USA TODAY Network.

The news organizations combined forces to investigate accidental shootings involving children, researching more than 1,000 incidents over a 2½-year span. In all, those shootings claimed the lives of more than 320 minors and more than 30 adults nationwide.

The investigation used information collected by the Gun Violence Archive, a nonpartisan research group, as well as news reports and public sources. It analyzed the circumstances of every death and injury from accidental shootings involving children ages 17 and younger from Jan. 1, 2014, to June 30 of this year.

Three of the Kansas deaths involved children 3 years old or younger who were killed after either they or other children found loaded guns in a home. Twelve others were wounded in accidental shootings during that span.

No charges were filed against the man whose gun killed Kaden because there were no indications of reckless negligence, said Reno County District Attorney Keith Schroeder.

“He didn’t have access to his dad’s gun,” Schroeder said. “It was another individual’s gun who was not used to being around children to begin with, and was convinced he had secured it. The child wandered into an area where he wasn’t supposed to be.”

Reno County Sheriff Randy Henderson said the roommate, who was not a law enforcement officer and has not been identified, always took his gun when he left the apartment but for some reason didn’t that day. During interviews with investigators, the man “swore up and down” that the gun was in his car, Henderson said.

The tragedy prompted Henderson to revive his department’s participation in Project Child Safe, a national gun safety program that had fizzled out after his office lost personnel to budget cuts, he said.

Instead of having school resource officers pass out gun locks at public functions like they did after the program began nationally in 2003, Henderson said his department now distributes them at the county correctional facility and provides education on its Facebook page about issues raised by Kaden’s death.

“I’m very proud of deputy Nagel,” Henderson said. “We helped him, but he has helped us get through this, as well.”