CALGARY — David McQueen’s life was in a downward spiral years before the disabled man started shooting randomly from his house and was killed by a police sniper bullet to the head, says a report into his death.

A fatality inquiry heard that McQueen, 53, began firing a gun from the Calgary home on the afternoon of Jan. 24, 2016. One shot shattered the windshield of a transit bus and sent glass into the driver’s face.

McQueen was forced outside when officers fired tear gas into the home, but he continued shooting before he was shot dead.

“Although his death is tragic given his mental state and personal circumstances, he posed a significant ongoing threat to police and the community, leaving police no option but the use of lethal force,” provincial court Judge Sharon Van de Veen wrote in her report released Wednesday.

McQueen became a quadriplegic in 1994 after he dove into shallow water at a Calgary lake and broke his neck. He used a wheelchair and had the use of his arms, but his hands had deteriorated years before and became claw-like.

The report said his condition worsened after his beloved dog, Bear, died of cancer.

He also went heavily into debt paying for his medical treatment and had ongoing feuds with Alberta Health Services about the care he was receiving. He was cut off from home care because he was belligerent, refused to attend medical appointments and didn’t account for money he had received.

In protest, he once sat in his own feces for an extended period of time.

The judge said other than antidepressants, McQueen received no mental-health care

“It appears Mr. McQueen was left to fend for himself the last week of his life, which he would have been unable to do,” wrote Van de Veen.

“He began believing people were spying on him” and that health officials “had planted microphones or listening devices throughout his home.

“He was extremely isolated.”

The judge said McQueen was clearly in anguish and is likely to have wanted to die at the hands of police.

She made a series of recommendations, including that Alberta Health Services carry out an independent study of glaring gaps in mental-health care. She said the study should include why police are commonly called as first responders when people are in crisis.

The judge also suggested mental-health professionals be made available to individuals like McQueen.