LEON, Kan. (AP) — Sheriff’s deputies have shot and injured a man they say was armed with a gun and heading into a Kansas bank.

The shooting happened Thursday afternoon in Leon as Butler County sheriff’s deputies sought to serve an arrest warrant on James Watts, 53, of Leon, according to the Kansas Bureau of Investigation.

Deputies followed Watts’ vehicle to Vintage Bank in Leon, the KBI said, pulled up and ordered him out of the vehicle. Watts initially ignored commands, deputies reported, before he got out of the vehicle armed with a pistol and walked toward the bank.

Deputies repeatedly ordered Watts to drop the gun, the KBI said, and when he reached the bank’s entrance and tried to go in, three deputies fired on him, hitting Watts several times.

Watts was rushed to a Wichita hospital, where he was in critical-but-stable condition following surgery.

The KBI is investigating the shooting.