A man fired several shots with an assault-style rifle at a suburban Kansas City headquarters for the Missouri State Highway Patrol before he was shot and wounded by troopers, the patrol said Tuesday.

LIBERTY — A man fired several shots with an assault-style rifle at a suburban Kansas City headquarters for the Missouri State Highway Patrol before he was shot and wounded by troopers, the patrol said Tuesday.

The man was shot Monday night at Troop A headquarters in Lee's Summit. Investigators are trying to determine his motive, but he was there "to do some harm, no doubt about it," spokesman Sgt. Bill Lowe said.

The man was in stable condition Tuesday at a hospital. No troopers or civilian employees inside the headquarters were injured.

The patrol said employees inside the building heard gunshots and troopers who went to an exterior door saw a man with the rifle. The man approached the main entrance and filed several shots.

He was shot after he did not comply with several orders from the troopers, Sgt. Andy Bell said.

Earlier Tuesday, Lowe also credited a trooper who was outside the building when the man arrived with helping to alert those inside.

A police bomb squad secured a suspicious package inside the suspect's vehicle, but it did not contain anything that would have harmed anyone, Bell said. Law enforcement officers were at a home in Kansas City on Tuesday processing evidence related to the shooting.

The patrol had not had much, if any, interaction with the man before Monday's confrontation, Lowe said.

Lowe said the shooting "could have been a lot worse" if troopers had not responded so quickly.

"It was fortuitous that the trooper was outside and that the other troopers were inside," Lowe said. "We had civilian dispatchers and others inside the building that were protected. I'm just thankful they were there."