Gregory Ulrich told the Allina Clinic doctor in Buffalo, Minn., he intended to kill people. One victim wouldn't be enough. He wanted to commit the kind of mass violence that would command the public's attention and warrant at least 30 years in prison or maybe a straitjacket.

Ulrich knew he'd only have seconds once he got through the clinic's security. So he was practicing.

This threat, recalled by Dr. Andrew Burgdorf in his application for a restraining order in 2018, is one of dozens of documented interactions with local law enforcement in police and court records involving Ulrich in recent years. The paper trail portrays the 67-year-old Buffalo man as a scofflaw with mental health and substance abuse issues who frequently called police to report unfounded thefts or minor quarrels with his neighbors, medical aides, tenants — anyone who entered his world — and who made no attempt to hide his violent ideations toward medical practitioners he believed wronged him.

All of these red flags were not enough to prevent the shooting at the clinic on Tuesday that left one dead and four others injured — an event of mass violence much like the one Ulrich had threatened in 2018. Ulrich has been arrested in connection with the shooting, and charges are expected to be announced Thursday.

Burgdorf, who declined to comment for this story, first called police to report Ulrich's threats on Oct. 13, 2018, reports show. The doctor told the officers that Ulrich had been harassing him with repeated phone calls vowing to shoot or plant explosives in the hospital as revenge for a back surgery. "I believe Ulrich is a high threat to society and himself," Burgdorf told police.

Ulrich was transported to an emergency room in nearby Monticello. Ulrich claimed he was only telling the doctor about his dreams and that he would not really commit the attack, according to the report.

Burgdorf filed for a restraining order, which a judge granted.

But Ulrich returned to the Allina medical campus just two weeks later. He asked a nurse for his medical records, then began complaining about his treatment in a previous visit. When the nurse said she didn't know anything about his past case, Ulrich "became upset, his behavior escalated and he began yelling," including challenging the staff's intelligence, according to a sworn affidavit from the nurse. Another staff member triggered the panic alarm and Ulrich fled when he saw security.

"I was fearful for my safety and the safety of others in the Hospital," the nurse recalled in the affidavit.

Ulrich came back to the clinic again a month later. Staff called police. Ulrich told them he'd come to "straighten things out" because he'd been "falsely accused." This time, police arrested and booked him. The courts dropped the charges, citing mental incompetency. A judge ordered Ulrich to undergo a psychological assessment, but when the date came the following summer, Ulrich said he couldn't attend due to his back hurting.

The arrest also did not end Ulrich's fixation on the medical facility. A week afterward, he called police to say he wanted to sue the doctors for performing unnecessary back surgery that "crippled him."

Nine days after that, hospital security at Stellis Health-Buffalo Clinic next door called police to say he'd trespassed twice. The responding officer was "not able to get in contact" with Ulrich, according to the report.

Ulrich called the Stellis nurse line a few months later and demanded a refill of narcotic medication.

In August 2019, Stellis staff called police once again to report "weird" letters sent from Ulrich. According to the report, the police officer who responded told the staff "they can ask [Ulrich] to stop contacting them" and explained the process of a restraining order.

Ulrich's history of substance abuse is also well documented in police and court documents.

Ulrich was convicted of two DWIs, an open-bottle offense and several crimes related to possessing illegal drugs, according to court records.

He was arrested last August after a bike patrol cop found him sniffing glue in a public park, carrying beer and marijuana with him, police reports show. The city banned Ulrich from the park for 30 days, but three days later police found him there with marijuana again, according to the reports.

Ulrich called police to accuse medical aides, without evidence, of stealing hundreds of prescription pills and medications, including Percocet, Valium and morphine, in 2016, shortly after his back surgery. Police investigated, but the officer dropped the case.

Two years later, Ulrich called 911 to report severe back pain, and when police and emergency responders from Allina responded, "he said he was out of pain pills and was looking for perhaps a missing bottle of pills."

A few months later, on Dec. 18, 2018 police responded to a call that Ulrich "was throwing up for several days."

It was just a few weeks after he'd been arrested in Allina for violating the restraining order from the doctor. Allina paramedics brought him to the emergency room to treat him.

Andy Mannix • 612-673-4036