A Kansas City, Kansas, police detective helping respond to a report of a suspicious person near a racetrack was fatally shot Monday, and a parolee sought for questioning in that and an ensuing string of reported carjackings was wounded after a shootout with police in neighboring Missouri.

The detective was shot at least twice about 12:30 p.m. near the Kansas Speedway, underwent surgery at a hospital and later died, his department said in a statement. His name was not immediately released, though a police spokesman, Patrick McCallop, called him "a seasoned officer."

"Our detective fought a good fight, but unfortunately he died from his injuries," Kansas City, Kansas, Police Chief Terry Zeigler said in a tweet. "Thanks for the support & prayers."

Police said the gunman, after wounding the detective, fled in the officer's unmarked car, then hijacked a vehicle with two children inside before abandoning it in nearby Basehor, Kansas, leaving those kids unharmed.

Police publicly appealed for help in trying to find Curtis Ayers, 28, for questioning in the shooting. That Tonganoxie, Kansas, man ultimately was taken into custody in Kansas City, Missouri, when he crashed the car he was driving while being pursued by officers, then was shot by police after trying to carjack a woman's vehicle.

That woman was wounded and taken to a hospital, Kansas City, Missouri, police spokeswoman Kari Thompson said without specifying her medical condition. Ayers was hospitalized in stable condition, McCallop said.

"This individual was very dangerous. We are so happy that this individual is in custody," Thompson told reporters later. "We are so glad this situation has come to an end."

Ayers has had longstanding trouble with the law, having served prison time in Kansas in recent years for convictions involving child abandonment, fleeing or trying to elude law enforcers, and interference with a law enforcement officer, online Kansas Department of Corrections records show.

Ayers previously had been charged in North Carolina with offenses ranging from misdemeanor theft to possession of stolen goods and burglarizing vehicles, according to court records.