CHICAGO — In the weeks and months before Donald Patrick was arrested for allegedly infiltrating the Chicago Police Department’s Homan Square facility, his estranged wife was sounding alarms about his behavior.

On Aug. 11, the woman, a Wisconsin resident, filed for an emergency restraining order against Donald. In her application, the woman told a judge that Donald had repeatedly harassed her and her family.

“His mental state can be chaotic,” she wrote. “You never know what you’re going to get.”

Patrick, of Waukegan, was arrested Monday on Chicago’s West Side after, police say, he climbed up five flights of a fire escape on the exterior of the CPD’s Homan Square facility. When he reached the fifth floor, he walked through an open door and into a police training exercise.

As part of that training, several officers had placed their guns on a table, where normal ammunition was replaced with non-lethal rounds. CPD Supt. David Brown said Patrick grabbed at least two of those guns off the table and pointed them at officers in the room. An officer then shot Patrick, who was later charged with five felony counts of aggravated assault of a peace officer and three felony counts of burglary.

Patrick’s estranged wife described his behavior as erratic. He made unannounced visits to her mother’s home, accused others of stealing his identity, and he threatened to tell police that his estranged wife was drinking alcohol while pregnant, she said, adding that Patrick was abusive throughout their relationship.

“Donald has always been mentally and physically abusive,” she wrote. “When we lived together he has [sic] ‘behaviors’ that were not in alignment with my moral beliefs. The need to leave Donald grew increasingly [sic] when my daughter was born. His ‘behaviors’ would have become ‘problematic’ in which he was not trying to correct. We were not safe.”

Wisconsin court records show the woman was initially granted the restraining order, however, the order was stricken 11 days later on Aug. 22 after Kenosha County Circuit Court Commissioner Loren Keating found “the matter has not been diligently prosecuted.”