Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A man charged with shooting and killing a supervisor at a Missouri community center Monday evening and then firing at police was a part-time janitor who "reacted with anger" after being sent home from work at the facility, the police chief said Tuesday.

A suspect, Michael Joseph Honkomp, 30, who was in serious condition at a hospital, has been charged with murder and other counts in the shooting at the Maryland Heights Community Center, near St. Louis, in which Maria L. Lucas, 45, was killed, police said.

Michael Joseph Honkomp. Maryland Heights Police

Maryland Heights Police Chief Bill Carson said the suspect, later identified as Honkomp, confronted Lucas at the front desk and shot her in the head with a handgun.

He then paced back and forth with the gun in his hand before a Maryland Heights officer who was in the parking lot entered the facility, Carson said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Honkomp is alleged to have fired several shots at the officer and was wounded when the officer returned fire. The officer was not injured.

"It's my belief that the actions of the officer involved were absolutely heroic. He immediately went and sought out the threat," Carson said. "And his actions may have prevented further bloodshed."

Honkomp was described as a part-time janitor at the community center who worked for the city for around three years.

About 150 people were in the community center, which has a gym and other amenities, at the time of the shooting. People inside reported running from the building or hiding in closets. Carson said that he did not know what the gunman intended to do after the shooting or whether he was waiting for police but that he did not flee the building.

In addition to murder, Honkomp is charged with one count of first-degree assault, one count of resisting arrest and three counts of armed criminal action, the city said in a statement.

It was not immediately clear Tuesday evening whether Honkomp had an attorney who could speak on his behalf. A phone number for someone who might be associated with Honkomp could not be found in public records.

The woman killed in the shooting, Lucas, was a customer relations specialist and a supervisor at the community center. She had worked for the city of Maryland Heights for seven years, Carson said.

Download the NBC News app for breaking news

The name of the officer was not released, but the police chief said he is a relatively new officer who has been out of the police academy for just over a year.

"He responded like an experienced veteran," Carson said. "I cannot tell you how proud I am of how he handled the situation."