A woman was accidentally shot and killed at a Walmart store in northern Idaho on Tuesday when her 2-year-old son pulled a loaded handgun from her purse that then went off, a county sheriff said.

The 29-year-old woman was shopping at a Walmart in Hayden, Idaho, with the toddler seated in her shopping cart when the incident occurred, Kootenai County Sheriff Ben Wolfinger said in a written statement.

Sheriff's officials said investigators were still processing the scene of the shooting, which took place shortly after 10 a.m. in the store's electronics department.

The woman's identity was withheld by authorities pending notification of next of kin.

"A very sad incident occurred at our store today in Hayden involving the death of a female customer. We are working with the Kootenai Sheriff's department as they investigate what happened," Walmart spokeswoman Brooke Buchanan said.

Buchanan said the store had been closed and would remain so until further notice.

Hayden is a community of about 10,000 people located in Kootenai County, north of Coeur d'Alene.