On Thursday, Judge Charles Burns found Hassan not guilty by reason of insanity following a bench trial, Cook County State’s Attorney’s office spokesman Andy Conklin said. He will be sent for a mental health evaluation in Elgin and be back in court Jan. 31, when results will be presented and a course of action determined.

Hassan, who lived on the fourth floor, allegedly poured gasoline in the hallway and ignited a blaze outside the fifth-floor apartment of two women with whom he had an ongoing feud, prosecutors said.

Arson investigators also found evidence that gasoline was used to ignite a second fire on the fifth floor outside the apartment of a man who died of smoke and soot inhalation, prosecutors said.

The victim was Noor Surani, 49, according to the Cook County Medical Examiner’s office. He was identified through dental records.

Five other people were injured in the blaze, including one man who jumped from the top floor during the blaze. Of the five injured — including two firefighters — only the jumper suffered serious injuries, accordig to Fire Media Affairs.

The blaze engulfed that fifth-floor hallway, entered one unit and burned a small area on the fourth floor. A witness spotted Hassan exiting the building stairwell minutes before smoke alarms went off. Investigators later found a red gas can with his fingerprints on it in the stairwell, prosecutors said.

Two weeks before the blaze, the women who had feuded with Hassan had their mailboxes robbed and someone wrote “f— you” on their apartment door in red spray paint, prosecutors said.

A search of Hassan’s apartment turned up receipts for the spray paint and mail addressed to the women, prosecutors said.

Hassan was found on the North Side on Jan. 15, and when police arrested him, he allegedly made an abrupt move with his left hand reaching for the small of his back, where police found a loaded 9mm semi-automatic pistol, prosecutors said.