Factory manager and human resources official are among Gary Martin’s five victims, local police chief says.

The gunman who killed five fellow workers at a factory in the US state of Illinois on Friday had just been fired from his job, according to local authorities.

Gary Martin, 45, had armed himself with a .40 calibre handgun, which he owned illegally, before reporting for a meeting where he was told he was sacked, Kristen Ziman, local police chief, told a news conference on Saturday.

Ziman says Martin pulled the gun and began shooting right after he heard the news. She says three of the five Henry Pratt Co. co-workers he killed were in the room with him and the other two were just outside. A sixth male worker was shot but survived.

The company is in a working-class district of Aurora, the second-largest city in Illinois, 65km west of Chicago.

Those killed included Josh Pinkard, the plant manager, and Clayton Parks, the human resources manager.

The other victims were identified as Trevor Wehner, a human resources intern, Russell Beyer, a mould operator, and Vicente Juarez, a stock room attendant and forklift operator. Police did not give the ages of the victims.

Another employee at the plant, whose name was not released, was wounded in the shooting and treated at hospital for non-life threatening injuries, police said.

Five police officers were also wounded by gunfire before Martin was killed in a shootout with police.

At least two of the wounded police officers remained in hospital on Saturday in stable condition, Ziman said. A sixth officer was injured in the incident, but not by gunfire, police said.

The factory-warehouse plant employs about 200 workers.

Prior felony

Martin had bought the weapon, a Smith and Wesson handgun with a laser sight, in 2014 before authorities realised he had a prior felony conviction, Ziman said.

“The fact remains that some disgruntled person walked in and had access to a firearm that he shouldn’t have had access to,” she said.

Investigators were seeking to determine why Martin was not forced to relinquish his gun before the shooting, Ziman said.

He should have been barred from owning a handgun because he had a 1995 conviction for aggravated assault in Mississippi, she said, and he also had at least seven prior arrests in Illinois.

The bloodshed marked the latest spasm of gun violence in a nation where mass shootings have become almost commonplace and came a day after the one-year anniversary of the massacre of 17 people by a gunman at Marjory Stoneman Douglas High School in Parkland, Florida.