A Calgary police detective who stole a gun — with a plan to kill himself — and then led officers on a chase through the city had hit "rock bottom," said his lawyer Thursday.

Thomas Bain, 37, pleaded guilty to nine charges including assault, theft, dangerous driving and firearms offences.

Bain pleaded guilty to four sets of charges, all stemming from incidents in 2018.

Since then, Bain has attended a treatment program to deal with his addictions and mental health issues.

"We had an individual who hit rock bottom," said defence lawyer Cory Wilson. "Fortunately, tragedy was averted."

Several of the charges related to domestic incidents, as Bain and his wife were splitting, including assault.

Bain's in-laws wrote an emotional victim impact statement describing how they were "paralyzed with fear" when they received a call from their sobbing daughter that he had taken off and was armed.

Both registered psychologists, Bain's in-laws said they regularly encouraged him to seek mental health supports.

They said they are terrified and that the safety of their daughter and grandchildren hinges on Bain's mental health and sobriety.

"If his mental health is not monitored, everyone is at risk," said Patricia Kostouros.

No jail time

Prosecutors Ron Simenik and Kevin Mark, along with defence lawyer Cory Wilson, made a joint submission for a two-year conditional sentence order, meaning Bain will serve his sentence in the community, on house arrest for half of that time.

Provincial court Judge Gordon Yake accepted the joint submission, which will also include a curfew for the second 12 months.

At the time of Bain's crimes, he was going through a split with his wife.

In February 2018, Bain, who was not on duty at the time, showed up at a man's house with his service gun, threatening the man and telling him to stay away from his wife.

In May 2018, Bain stole $67 worth of groceries from Walmart.

Three days after that, he went back to Walmart and cut the barcode from a $200 blender, replacing it with a barcode that scanned $40.

The police chase

Later the same month, Bain forged a prescription for Dexedrine and tried to get a pharmacist hand over 180 pills.

Bain's assault charge stems from an incident where he spat in his wife's face in front of their children.

On May 28, after getting in a fight with his estranged wife, Bain drove to the District 7 office, stole a service gun and drove around Calgary. At one point, he spoke with a friend on the phone, telling her he planned to kill himself.

CPS was called and officers chased Bain around the city. At times, the off-duty officer was driving more than 60 km/h over the speed limit.

Eventually, he stopped and dropped the gun in a Canada Post mailbox and then used a phone at a convenience store to call a coworker, asking the friend to pick him up and take him to hospital.

Members of the tactical team found Bain walking down Elbow Drive S.W. He surrendered to them and was taken to hospital.

CPS says Bain is on a leave of absence for unrelated issues.