The gunman who killed five colleagues at a suburban Chicago manufacturing plant and wounded five police officers before he was killed in a shootout had told a co-worker that February morning that he would kill everyone there and "blow police up" if he was fired, prosecutors said in a report released Monday.

The Henry Pratt Co. employee told authorities in Aurora that he knew Gary Martin carried a firearm in his vehicle, but that he didn't report Martin's comments to his superiors because he routinely made "off the wall" statements and that he didn't believe Martin would do anything violent, according to the nine-page Kane County State's Attorney's office report . The employee is not named in the report.

While it has widely been reported that Martin had been fired, the report marks the first time officials have explained that Martin's firing came during a Feb. 15 disciplinary meeting that was called because of his refusal to wear safety glasses.

He anticipated he was about to be fired, telling his co-worker that morning: "If I get fired, I'm going to kill every motherf---er in here," the report says.

It also explains that Martin apparently brought the gun and ammunition into the plant when he arrived at 6:45 a.m. that day. Immediately before the shooting, Martin walked "over to his workstation to retrieve something," put on a hoodie and went into the bathroom, it says.

Martin then went to the meeting during which he was told by Clayton Parks, the company's human resources manager, that he'd been fired. Martin responded with profanities and plant manager Josh Pinkard said, "OK, it's over." Martin said, "Yeah, it is over," and opened fire.

Both Parks and Pinkard were among those who were killed.

The report also gives an account of the police response, beginning with officers being dispatched to the scene at 1:24 p.m. when they are confronted by Martin. Video surveillance footage indicates Martin was waiting for police to arrive after he killed his colleagues and "positioning himself near a doorway." In a five-minute period, five officers were shot in the parking lot and inside the building.

Naperville Police Officer Shaun Moy described searching the building carrying a protective shield and coming upon the bodies of two people on the second floor who he believed were dead, the report says. On the first floor of the warehouse, the officer heard noises from a workshop and saw Martin "quickly pop up from behind some machinery and point a gun at him that was equipped with a green laser," it says.

Moy said he believed the gun was pointing "directly at him," and that he saw Martin fire at least four shots. The officer said he returned fire as other officers set off flash bangs — noisy explosives designed to distract — that allowed other officers to take cover behind a partition wall. Later in the report, Aurora police Detective Chris Bosson said he saw Martin inside a room in the warehouse sitting in a chair, holding a pistol in his right hand.

"It appeared that the offender was waiting for police to enter the area where the offender was located in order to ambush the police," according to the report. The officer said he fired his rifle twice, hitting Martin in the chest and head. The officer said he saw another officer fire his weapon three times.

The report, citing an autopsy, says Martin was shot six times: once in the middle of the forehead, four times in the chest, and once in the jaw — an injury that fractured his skull that the Kane County coroner's report concluded was likely self-inflicted.

Martin fired his weapon dozens of times. Prosecutors wrote that the Illinois State Police recovered 64 casings at the scene from the semi-automatic handgun Martin was carrying.

The report does not say the exact time the shooting started, but that police were dispatched to the scene at 1:24 p.m. The first officers entered the building about four minutes later, and five officers suffered gunshot wounds outside and inside the building between 1:30 and 1:35, the report says.

The next time listed on the timeline is 2:59 p.m. with the words, "suspect is down."

The report concludes that the officers were justified in using deadly force.