A man who killed five co-workers at a suburban Chicago manufacturing warehouse brought his gun to a meeting in which he was going to be sacked, authorities said.

Another employee and five police officers were injured in the incident in Aurora involving warehouse worker Gary Martin.

Police chief Kristen Ziman said that because Martin brought his gun to the meeting at the sprawling Henry Pratt Co warehouse in the town, he likely knew it was possible he was about to lose the job he had held for 15 years.

She said that as soon as he was sacked, he pulled his handgun and began shooting. Three of the five co-workers he killed were in the room with him and the other two were just outside, she said.

Officers arrived on the scene within minutes after frantic emergency calls started pouring in.

Martin fired on the officers when they arrived, striking one outside and another near the building’s entrance. The other three wounded officers were shot inside the building. None of their wounds are considered life-threatening.

All of the officers who were wounded were shot within the first five minutes of police arriving at the scene. Martin then hid inside the 29,000-square-foot building and a search ensued. He fired on an officer about an hour later and police fired back, killing him.

Gary Martin
Gary Montez Martin, who police say killed multiple people at a suburban Chicago manufacturing warehouse (Aurora Police/AP)

Police identified the five killed workers as human resources manager Clayton Parks of Elgin; human resources intern and Northern Illinois University student Trevor Wehner of DeKalb; plant manager Josh Pinkard of Oswego; mould operator Russell Beyer of Yorkville; and stock room attendant and fork lift operator Vicente Juarez of Oswego.

Martin had been arrested six times in Aurora over the years, including for domestic battery, Ms Ziman said.

He was able to buy the Smith and Wesson .40-calibre handgun he used in the attack because an initial background check did not catch that he had a prior felony conviction in Mississippi.

Kristen Ziman
Aurora Police Chief Kristen Ziman (AP)

Martin was issued a firearm owner’s identification card in January 2014 after he passed the initial background check, and he bought the gun in March 11 of that year.

It was not until he applied for a concealed carry permit five days later and went through a more rigorous background check that uses digital fingerprinting that his 1995 felony conviction in Mississippi for aggravated battery was flagged and his firearm owner’s ID card was revoked, Ms Ziman said.

The shooting has shocked the city of 200,000 people, which is about 40 miles west of Chicago.