Harvey County Sheriff T. Walton said the dead included the gunman, an employee at Excel Industries, located in a tight-knit community north of Wichita.
Walton said the first officer to arrive at the scene shot the gunman, saving “many, many lives.”
“This is a horrible situation, just terrible,” Walton said, adding that his department received a call from the White House after the incident.
Walton said authorities had information on “some things that triggered this individual,” but he would not elaborate.
The sheriff initially had said that up to seven people had been killed and up to 30 wounded but later revised the toll downwards.
The carnage was the latest in a string of mass shootings in the United States, where such attacks have become commonplace.
Walton said the gunman, who he declined to identify, first fired at two motorists from his car, stealing one of the victims’ pickup truck before heading to the factory.
He shot a woman in the parking lot with an assault rifle and then entered the facility unleashing a volley of bullets as people ran for their lives screaming “run, fire, fire,” according to one witness.
Local media identified the gunman as Cedric Ford, 38, who worked as a painter at the factory and had posted a picture of himself on Facebook with an assault rifle.
Ford recently moved to the area from Miami, and had an extensive criminal record, including a history of prowling, loitering and illegal weapons possession, media reports said.
Walton said police surrounded the gunman’s home after the shooting but his male roommate refused to allow them in, resulting in a standoff that continued unresolved late Thursday.
“We will make entry,” he said.
– ‘Wake up’ –
The victims were transported to area hospitals, where five were listed in critical condition, as family members rushed to the factory for news of their loved ones.
One man said his 21-year-old nephew had been shot four times.
“I hear about these shootings at theatres and things, and it’s just a mess… it’s horrible,” an eyewitness said, referring to mass shootings that have become a fact of life across the country.
“This guy had this planned.”
Several employees at the plant told local media they believed that the shooter had emotional and mental problems.
“Someone said this guy got fired, got upset and just came back and shot people,” Marty Pierce, an eyewitness who works at the plant, told KAKE television.
The Hesston shooting was the latest in a string of mass killings in the United States that include Saturday’s rampage by an Uber driver that left six people dead in Michigan, the December terror attack in San Bernardino, California that left 14 people dead, and the December 2012 Sandy Hook school massacre that killed 26, including 20 children.
Gun violence claims the lives of about 30,000 Americans every year and mass shootings — rare in most countries — have been on the rise.
In a grim irony, Walton said his department had held a meeting last week on how to deal with an active shooting situation.
“Any place that thinks it can’t happen here, wake up,” he said. “Because it can happen.”
“This is a fairly peaceful community,” he added. “And to have something like this happen is tragic.”