DYERSVILLE, Iowa (AP) — Police have charged the parents of a Dyersville toddler, saying the boy accidentally shot his mother with an unsecured gun he found in the family home.

Police say 21-year-old Meriah Carlyle and 23-year-old Logan Keller have each been charged with child endangerment for leaving a loaded handgun on a bedside table on Nov. 4. Investigators say the 2-year-old found the gun, then accidentally shot his mother, who had to be flown to an Iowa City hospital for life-saving treatment.

Police say in a criminal complaint that both parents were in the room with the child where the gun was, but didn’t notice the boy had picked up the gun until it fired.