HALIFAX, Nova Scotia (AP) — A document released Tuesday in a Canadian court details warning signs of paranoid behavior and the stockpiling of guns and gasoline by the man who went on a rampage that killed 22 people in Nova Scotia last month.

In the document made public following an application by media organizations, seven witnesses who had encountered Gabriel Wortman told of his personality issues or recounted seeing some of his weapons at his clinic in Dartmouth and a property in Portapique that he dubbed “the warehouse.”

One witness described the now dead gunman as an abusive “sociopath” who kept a rifle by the fireplace that was described as ``like a machine gun.″

A former colleague told officers that Wortman was "paranoid" about the COVID-19 pandemic and added that he had experienced “a mental breakdown” while discussing a deed for a property in Portapique. That witness was among those who said the killer talked about various types of guns, assault rifles and handguns.

The 40 pages offer glimpses of Wortman's rural property where the 51-year-old denturist entertained friends and kept a well-stocked bar and a collection of motorcycles. An acquaintance who visited told police that Wortman showed guests his guns and some decommissioned police cars he had bought.

Police have said that beginning on the night of April 18, Wortman used accelerants to light fires in five Nova Scotdia communities and shot people with four semi-automatic weapons that he wasn’t licensed to own as he drove about in a replica police car. Thirteen of the victims were killed by gunfire and nine died in fires, police have said.

Wortman, who was killed by police before noon April 19, owned four used police cars obtained at auction and collected police uniforms. He wore the uniforms during his rampage.

In the document, some witnesses estimated that Wortman had bought $800 worth of gasoline before the killings.

Emails from the killer written four days before the mass shooting provided no hint of what was to come.

“I am currently residing at my cottage in Portapique. I am enjoying this prelude to retirement, unfortunately not able to get to ... ,″ says one message, the last word removed by prosecutors before releasing the document. "I am around in the a.m.’s 9-12 studying the news on U-tube. Stay safe, Gabe.”

In the document, Royal Canadian Mounted Police Sgt. Angela Hawryluk describes how the first two officers to arrive on the scene on the night of April 18 encountered a wounded witness who told them he had been fired on by a man in uniform driving what the man thought was an RCMP vehicle.

The witness, who is not identified by name, told the two officers that he and another person saw a building on fire in Portapique and then spotted a police vehicle at a second, nearby building that was burning as well. Thinking the driver was an RCMP officer responding to the emergency, they headed for the car. The gunman inside opened fire on them and they fled.