HAYDEN, Idaho — The details are shatteringly ordinary. A 2-year-old toddler, sitting in a shopping cart in a Walmart, his mother’s purse unattended and within reach as she shopped. Three girls, all under age 11 — relatives of the boy and his mother, the police said — tagging along. A frosty morning in the northern Idaho panhandle, the temperature in the teens. Holiday break. The clothing aisles near electronics, back of the store.

Then, shortly before 10:20 a.m. on Tuesday, as the store video cameras recorded the scene, the little boy found a gun in his mother’s purse and it discharged once at near point-blank range from where she stood, less than arm’s length away, said Lt. Stu Miller, a spokesman for the Kootenai County sheriff’s office. She died at the scene, he said, her death appearing to be accidental.

“He probably still doesn’t even know what has happened,” Lieutenant Miller said of the boy.

The victim, Veronica Jean Rutledge, 29, of Blackfoot, Idaho, about 380 miles from Hayden in Idaho’s southeast corner, was visiting family members here in this community of about 13,000 people bordering the resort town of Coeur d’Alene, about 40 minutes from Spokane, Wash. Both her parents and her husband’s live in the area, Lieutenant Miller said.

He did not know whether Ms. Rutledge had a permit to carry a concealed weapon. Her husband came to the store to collect his son and the girls after the accident.