Three men were charged Thursday with attempted capital murder after a shootout with Kansas City, Kansas, police officers during an attempted undercover drug buy, officials said.

Wyandotte County District Attorney Mark Dupree said Cornell Lance Jones Jr.; Samarion Ardel England; and Jaeveon Mitchell-Locke face possible life sentences if they are convicted. They range in age from 18 to 22.

Three officers were shot and two others were wounded by shrapnel in the shootout Wednesday in front of convenience store in Kansas City, Kansas. The three suspects were also shot.

Kansas City, Kansas, Police Chief Karl Oakman said only one officer remained hospitalized Thursday and he was expected to be released soon. It was not clear if the suspects were hospitalized but their injuries were not considered life-threatening.

DEMOCRAT LAWMAKER LOSES IT AFTER STATE LEGISLATURE OVERRIDES VETO OF TRANSGENDER SPORTS BILL: 'FULL OF S---'

Kansas Fox News graphic

Three people have been charged in a shooting of three Kansas officers during a drug probe.

CLICK HERE TO GET THE FOX NEWS APP

Oakman said undercover officers were trying to buy fentanyl from the defendants when the drug buy fell through. The officers who were injured responded to help arrest the men.

The men are also charged with aggravated assault against an officer, aggravated child endangerment and fentanyl distribution, Dupree said. They are in custody on $250,000 bond.

Dupree said three children and other adults were inside the store when the shooting occurred. None of them were injured although bullets did enter the store, he said.