MIDDLETON, Wis. (AP) -- A heavily armed man opened fire on his co-workers at a Wisconsin software company Wednesday, seriously wounding three people before being fatally shot by police as employees ran from the building or hid inside, according to investigators.
Middleton Police Chief Chuck Foulke said officers shot the man within eight minutes of receiving calls about an active shooter at WTS Paradigm. Foulke said the man was armed with a semi-automatic pistol and extra ammunition, and fired at officers before he was shot.
Foulke said three people were seriously injured during the attack, while a fourth person was grazed by a bullet.
"I think a lot less people were injured or killed because police officers went in and neutralized the shooter," Foulke said.
The police chief said the motivation behind the attack was unclear and investigators didn't yet know whether the gunman targeted his victims. He didn't release the suspect's name but said he was an employee of WTS Paradigm and lived in nearby Madison.
Foulke said the investigation was ongoing but noted: "We have reason to believe the suspect was heavily armed with a lot of extra ammunition, a lot of extra magazines."
Judy Lahmers, a business analyst at WTS Paradigm, said she was working at her desk when she heard what sounded "like somebody was dropping boards on the ground, really loud." Lahmers said she ran out of the building and hid behind a car.
She said the building's glass entrance door was shattered.
"I'm not looking back, I'm running as fast as I can. You just wonder, 'Do you hide or do you run?'" she told The Associated Press.
She said she knew one co-worker had been grazed by a bullet but was OK. She didn't have any other information about the shooting but said it was "totally unexpected. We're all software people. We have a good group."
WTS Paradigm Marketing Manager Ryan Mayrand said in a statement Wednesday evening that the company was "shocked and heartbroken" and was working to set up counseling for workers. He asked the media to respect the privacy of the workers, particularly those who were among the victims.
University Hospital in Madison confirmed Wednesday afternoon that it was still treating three victims from the shooting, saying one was in critical condition and two were in serious condition.
Police conducted a secondary search of the office building after the shooting to ensure there were no more victims or suspects — and officers discovered some people still hiding in the building, which also houses Esker Software.
Gabe Geib, a customer advocate at Esker Software, said he was working at his desk when he heard what "sounded like claps." He said he then saw people running away from the building at "full sprint."
"We knew at that point that something was going down. A ton of people were running across the street right in front of us," he said.
Geib said he and his colleagues were still huddled in their cafeteria, away from windows, more than an hour after the shooting.
Jeff Greene, who also works at Esker, said police told those gathered in the cafeteria to go to a nearby hotel to make a statement about what they saw.
Three yellow school buses full of more than 100 people, including witnesses, were unloaded at a hotel about 5 miles (8 kilometers) from the office building. Some people hugged as they were reunited with loved ones. Others stopped to pet a dog that had been brought by someone picking up a worker.
WTS Paradigm makes software for the building products industry. A Wisconsin State Journal profile from 2014 listed company employment at about 145 employees and noted the company was looking to move to a larger location at the time.
The company's website was down Wednesday.
A shopping center next to the building was temporarily put on lockdown at the direction of police.
Middleton is about 90 miles (145 kilometers) west of Milwaukee.
Associated Press writers Gretchen Ehlke in Milwaukee, and Amy Forliti and Jeff Baenen in Minneapolis contributed to this report.