Gregory Paul Ulrich dreamed of getting revenge on the doctors and medical staff who had "tortured" him, records show.

In October 2018, Ulrich was calling his former doctor three times a day, threatening a mass shooting, to blow things up and other revenge scenarios, according to a Buffalo, Minn., Police Department report.

"I believe Mr. Ulrich is a high threat to society and himself," the doctor told police at the time.

More than two years later, Ulrich, 67, was arrested after five people were shot at the Allina Health clinic in Buffalo. Whether he obtained his gun legally was unclear Tuesday.

After the 2018 threats, Ulrich was taken to an emergency room for a mental health evaluation. His complaints appeared to stem from a series of back surgeries and medications he took afterward, police said.

He threatened four Allina facilities, with Buffalo first on the list, and said he wanted to do something "big and sensational so that it makes an impact," the report said.

Allina medical staff believed Ulrich could act on the threats and filed paperwork barring him from the property, which police delivered to his home. Ulrich was charged with violating the restraining order at the Buffalo clinic in November 2018. That case was dismissed last year after he was found mentally incompetent, records show.

Neighbor Bob Taylor described Ulrich as a heavy drinker and marijuana smoker who spent most of his time fishing at a nearby lake, and perturbed his neighbors by throwing fish innards in the water after he cleaned his catch. Taylor said he'd lived at the Pulaski Mobile Home Park for about eight years, and Ulrich had been there before him. The park was like a family, he said, "and he didn't fit in."

"I still can't believe it," Taylor said.

At a news conference Tuesday, Wright County Sheriff Sean Deringer said Ulrich was "no stranger" to law enforcement, saying his office and Buffalo police have been responding to 911 calls related to Ulrich dating to 2003. Court records indicate a history of substance abuse and mental health issues, though Ulrich has never been convicted of a violent or gun-related crime.

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

As Ulrich's case for violating Allina's restraining order wound through the courts, an official wrote in 2019 that Ulrich had previously applied for and been denied a permit to buy a firearm. A court official argued that it was "highly recommended that [Ulrich] not be allowed to have use or possession of any dangerous weapons or firearms as a condition of his probation."

Raymond Zandstra, who had rented a room in Ulrich's trailer and left on bad terms, said in an interview that he saw Ulrich with a gun last summer, a Smith & Wesson that was new and still in the box. He didn't know where Ulrich got it.

In 2019, the Zion Lutheran Church called 911 after receiving a "disturbing letter" from Ulrich. Members of the church did not return calls Tuesday, but according to notes from a newsletter on the church website: "The Buffalo Police Department was called and informed Pastor Ted that Mr. Ulrich is well known to them and recommended that a no trespassing order be issued so that if he ever did appear at Zion the police could take action." The order was issued the following day and church staff were given a picture of Ulrich and told to call 911 if he trespassed.

Walter Rohde, another neighbor, said he was shocked to hear that Ulrich was the man believed to have shot several people at the Allina clinic. "I just knew him as a kindly old man," said Rohde, who lives just a few doors down from Ulrich's trailer. "He liked to drink, I can tell you that much."

Staff writers Libor Jany, Matt McKinney and Paul Walsh and staff photographer Mark Vancleave contributed to this report.

Andy Mannix • 612-673-4036