This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

CHICAGO — Juan Lopez had threatened women before Monday’s shooting at Mercy Hospital but he never faced criminal charges, according to a review of court records by WGN Investigates.

Lopez’ ex-wife citied “constant infidelity and abuse” when she sought a dissolution of marriage roughly four years ago. “I fear that my safety is in jeopardy” the ex-wife said in a hand-written request for an emergency order of protection. WGN Investigates was not able to reach the ex-wife for comment.

Police say Lopez showed up at Mercy Hospital Monday to confront Dr. Tamara O’Neal, who had broken-off an engagement with him. Witnesses say the two argued in the parking lot before Lopez pulled a gun and fired several shots and fled inside the hospital where the shooting continued. O’Neal was killed, as was pharmacy resident Dayna Less and Chicago police Officer Samuel Jimenez. Lopez died after an exchange of gunfire with police.

Court records reveal Lopez’ ex-wife was fearful as their marriage ended. “In the last month [Lopez] has slept with pistol under his pillow,” she wrote. She said she was fearful their young child would get his hands on the gun. She also described an incident in which Lopez pulled a gun on a realtor. In December 2014, she wrote: “He began sending threats via text message to come to my job and cause a scene.” The marriage ended in 2015.

“He was accused of aggressive and improper conduct toward females at the academy,” Chicago Fire Department spokesman Larry Langford told the Tribune. “He was disciplined and terminated.”

Lopez reportedly held a valid firearm owner’s identification card and concealed carry license. He legally purchased at least four guns in the last five years, according to the Tribune.