Four people were injured, one of them critically, when a heavily armed employee opened fire Wednesday morning in the offices of a software company in Middleton, Wisconsin, authorities said.

Police shot and killed the gunman, who hadn't been identified.

Middleton Police Chief Charles Foulke said police received calls of a shooting at 10:25 a.m. (11:25 a.m. ET) at a complex housing several businesses. The shooting occurred in the offices of WTS Paradigm, a business products software company, where "officers engaged the suspect, and he was shot by officers," Foulke said.

University of Wisconsin Medical Center in Madison said that one patient was critically wounded and that two others were in serious condition. A fourth person was grazed by a bullet and suffered minor injuries, police said.

The gunman was "heavily armed, with a lot of extra ammunition," Foulke said. Two Middleton police officers and two Dane County sheriff's deputies shot the man, who later died at a hospital, he said.

Foulke said it was clear that the officers "prevented a lot more bloodshed from happening."

The police chief said he couldn't identify the gunman pending notification of his family, but he said that the man was an employee and that "it wasn't unusual for him to be there." No motive had yet been determined, he said.

Judy Lahmers, a business analyst for WTS Paradigm, told The Associated Press that she was at her desk when she heard the gunshots. She ran out of the building and hid behind a car.

"I'm not looking back. I'm running as fast as I can. You just wonder, 'Do you hide or do you run?'" Lahmers said.

Lahmers said a co-worker had been grazed by a bullet.

Gabe Geib, a customer advocate for Esker Software, another company in the building, said he saw people running "full sprint" after the shots were fired.

Gov. Scott Walker tweeted that his office was "closely following this situation."

Tonette & I are praying for those who were injured and for those who are caring for them at local hospitals. On behalf of a grateful state, I thank our outstanding first responders who acted decisively in the face of danger and stabilized the situation. — Governor Walker (@GovWalker) September 19, 2018

"Tonette & I are praying for those who were injured and for those who are caring for them at local hospitals," Walker wrote.