AURORA, Ill. — The gunman who shot and killed five co-workers and injured five police officers after he was fired from his job had his gun permit revoked five years ago after a background check turned up a prior felony conviction in Mississippi, police said Saturday.

The gunman, Gary Martin, 45, was shot and killed by police after officers swarmed the scene Friday at the Henry Pratt Co. plant in Aurora. Henry Pratt is a subsidiary of Atlanta-based Mueller Water Products.

Aurora Police Chief Kristen Ziman said investigators are trying to determine why Martin was able to continue to possess a Smith & Wesson handgun even after it was discovered he was rejected for a conceal carry permit.

“Absolutely he was not supposed to be in possession of a gun,” Ziman said.

Three of the victims, including two who worked in the human resources department, were shot during the meeting where Martin was being terminated, Ziman said. The other two were killed in another part of the 29,000 square foot warehouse, Ziman said.

Mueller CEO Scott Hall said in a press conference on Saturday that Martin was set to be fired for a “culmination of various workplace rules violations.” He declined to specify the violations.

Hall said that the company conducted a background check on Martin prior to his hiring 15 years ago. The gunman’s 1995 felony conviction in Mississippi didn’t surface in the check, Hall said.

Hall said that Martin worked part of the workday Friday before he was called into a meeting room where he was to be fired.

Nine workers were in the warehouse space at the time of the shooting. The company had security cameras outside the building but no cameras inside the facility.

Police still do not know why Martin was being fired.

Ziman told reporters that Martin had six prior arrests, including one in 2008 for a domestic matter and one in 2017 for disorderly conduct and criminal damage to property.

She said that after a background check in January 2014, he was issued an Illinois firearms I.D. that allowed him to purchase the Smith & Wesson handgun from a local dealer on March 11, 2014. The weapon was believed to be used in the rampage.

More:Factory shooting rampage victims include HR manager, college intern and forklift operator

Five days later, when he applied for a concealed carry permit, which requires a more extensive background check, his fingerprints turned up a felony conviction in Mississippi in 1995. At that point, the firearms I.D. permitting him to carry the handgun was revoked.

“During the fingerprinting and background process it was discovered that he had a felony conviction for aggravated assault out of Mississippi,” Ziman said. “It should be noted that this conviction would not have shown up on a criminal background check conducted for an FOID card.”

In addition to the five fatalities, five Aurora officers received non-life threatening gunshot wounds during the rampage, Ziman said. A sixth officer received a minor injury not related to gunfire.

The dead were identified as Clayton Parks, of Elgin, a human resources manager; Trevor Wehner, of DeKalb; a human resources intern and student at Northern Illinois University; Russell Beyer, of Yorkville, a mold operator; Vincente Juarez of Oswego, a stock room attendant and fork lift operator; and Josh Pinkard, of Oswego, the plant manager.

Asked why Wehner, an intern, was in the sensitive situation of being in the room during the firing of a longtime employee, Hall paused and choked back tears during the Saturday press conference.

“That’s a really tough question,” Hall said. “I don’t think we had thought about that, ever.”

The Henry Pratt Co., about 40 miles west of Chicago, is one of North America’s largest manufacturers of valves for the potable water, wastewater, power generation and industrial markets. The company was founded in 1901.

During World War II, the Company manufactured propellers for Liberty Ships , and in the 1920s, the company made products for electric power plants and gas plants.

The company has a tradition of industry firsts. When welding came into use in the mid-1920s, Pratt was instrumental in the design and production of the first welded smoke stack, which was installed at Commonwealth Edison’s Fisk Street Generating Station.

Contributing: Associated Press