Updated

A Kansas police officer was called a “tremendous hero” Friday after shooting and killing a gunman who killed three people and injured 14 others at a lawnmower-parts plant.

Harvey County Sheriff T. Walton said the officer stopped a bigger massacre because there was about 200 or 300 people still at the Excel Industries building in Hesston and the “shooter wasn’t done by any means.” Had the officer “not done what he did, this would be a whole lot more tragic,” he added.

“This man wasn’t going to stop shooting,” Walton said, according to the Wichita Eagle. “The only reason he stopped shooting is the officer stopped the shooter.”

Gov. Sam Brownback said preliminary information indicated that the officer was Hesston Police Chief Doug Schroeder, who didn’t wait for backup and “seized the situation.” The Associated Press reported that Schroeder has been on the job since 1998.

“The Hesston police chief, in particular, went in immediately,” Brownback said. “Rather than even waiting on backup, he went right in and did heroic duty and service.”

Earlier Friday, the gunman was identified as Cedric Ford, 38, a worker at the factory. As a convicted felon, he was prohibited from owning any kind of firearm. A woman was charged with supplying him with an assault rifle and a pistol.

Authorities said Ford had just been served with a protective order involving a former girlfriend that probably set off the attack.

While driving to the factory, the gunman shot a man on the street, striking him in the shoulder. A short time later, he shot someone else in the leg at an intersection, authorities said.

The suspect shot one person in the factory parking lot before opening fire inside the building, the sheriff's department said.

Ford had several convictions in Florida over the last decade. His past offenses included burglary, grand theft, fleeing from an officer, aggravated fleeing and carrying a concealed weapon, all from Broward and Miami-Dade counties.

According to the Wichita Eagle, Ford has also had criminal cases in Harvey County, including a misdemeanor conviction in a 2008 fighting or brawling case and various traffic violations from 2014 and 2015.

Walton said Ford had been "in my jail a couple of times before."

Excel was "deeply saddened by the horrific event that occurred yesterday," president and CEO Paul Mullet said.

The shooting came less than a week after authorities say a man opened fire at several locations in the Kalamazoo, Michigan, area, leaving six people dead and two severely wounded. Authorities haven't disclosed a possible motive in those attacks.

Eleven of the people wounded in Thursday's attack were taken to two Wichita hospitals, where one was in critical condition, five were in serious condition, and five were in fair condition Friday morning, hospital officials said. The others were taken to a Newton hospital, and their conditions weren't immediately available.

Walton said his office served the suspect with the protection from abuse order at around 3:30 p.m., which was about 90 minutes before the first shooting happened.

While driving to the factory, the gunman shot a man on the street in the nearby town of Newton, striking him in the shoulder. A short time later, he shot someone else in the leg at an intersection.

"The shooter proceeded north to Excel Industries in Hesston, where one person was shot in the parking lot before he opened fire inside the building," the department said in a release. "He was seen entering the building with an assault-style long gun."

Dennis Britton Jr. suffered a fracture in his right leg when a bullet went through his buttocks and out his leg. Britton's father, Dennis Britton Sr., who also works at the plant as a welding team leader, said his son was "awake and talking and communicating."

0227 kansas shooting

Feb. 26, 2016: FBI agents search the parking lot at Excel Industries, the scene of Thursday's shooting, in Hesston, Kan. (AP)

Martin Espinoza, who works at Excel, was in the plant during the attack. He heard people yelling to others to get out of the building, then heard popping, then saw the shooter, a co-worker he described as typically pretty calm.

Espinoza said the shooter pointed a gun at him and pulled the trigger, but the gun was empty. At that point, the gunman got a different gun and Espinoza ran.

"I took off running. He came outside after a few people, shot outside a few times, shot at the officers coming onto the scene at the moment and then reloaded in front of the company," Espinoza told The Associated Press. "After he reloaded he went inside the lobby in front of the building and that is the last I seen him."

Authorities identified the dead as 44-year-old Brian Sadowsky of Newton; 31-year-old Josh Higbee of Buhler; and 30-year-old Renee Benjamin, whose hometown was unavailable.

Hesston is a community of about 3,700 about 35 miles north of Wichita. Excel Industries was founded there in 1960 and manufactures Hustler and Big Dog mowing equipment.

The Associated Press contributed to this report.

Click for more from The Wichita Eagle.