SHAWNEE, Kan. (AP) — A man has pleaded guilty to an attempted robbery outside a Walmart in Kansas that ended with a good Samaritan wounded and a second suspect dead.

The Kansas City Star reports that 28-year-old Arthur Fred Wyatt III, of Overland Park, pleaded guilty Thursday to charges that included second-degree attempted murder.

Investigators say Wyatt and another man attacked a woman on Sept. 11, 2016, as she was putting her child in a safety seat in the parking lot of a Walmart in Shawnee, a suburb of Kansas City.

A man in the lot intervened and was shot several times. Shawnee police say another good Samaritan shot and killed one of the attackers, John Simmons of Kansas City.

Sentencing is set for Nov. 2.