A man who killed 11 people and injured 17 others died from a cocaine overdose after he was taken into police custody, a pathologist told a coroner’s inquest in Canada on Tuesday.

Myles Sanderson, 32, had been on the run for several days in the province of Saskatchewan when police caught up to him on Sept. 7, 2022.

He went into medical distress during his arrest and was pronounced dead in a hospital. Officials hadn't released the details until now.

CANADIAN MAN FOUND GUILTY, SENTENCED TO LIFE FOR TRUCK ATTACK WHICH KILLED MUSLIM FAMILY

"There was so much cocaine there," said forensic pathologist Dr. Shaun Ladham, describing the amount of the drug found in Sanderson’s body.

Royal Canadian Mounted Police dashboard camera video played at the inquest shows Sanderson’s arrest after a high-speed chase.

He began to convulse and was given naloxone, a drug used to reverse opioid overdoses.

Canadian flag

The Canadian flag flies in front of a clear sky. (iStock)

Three days before he was captured, Sanderson went from home to home on the James Smith Cree Nation and in the nearby village of Weldon, kicking in doors and attacking people.

The stabbing rampage raised questions of why Sanderson — an ex-convict with 59 convictions and a long history of violence — was out on the streets in the first place.

Earlier Tuesday, jurors heard Sanderson ask Mounties during his arrest how many he had killed.

"How many bodies did I get?" he says in the dashboard video.

Sgt. Ken Kane, a detective with Saskatoon police, described the video for jurors, saying Sanderson expressed shock that "nobody even shot at me, man."

"You should have shot me," Sanderson says repeatedly to officers in the video.

The inquest previously heard how Sanderson was able to evade capture for three days and seven hours after the killings.

A call that came in to police from a woman who said Sanderson had broken into her home and stolen her truck set off a rapid search throughout the area.

A separate inquest into the massacre was held last month, which examined each of the killings and issued more than two dozen recommendations.

The inquest into Sanderson’s death, which is scheduled for a week in Saskatoon, is required under legislation because he died in police custody.

CLICK HERE TO GET THE FOX NEWS APP

It is to establish when and where Sanderson died and the cause of his death. The six-person jury may also provide recommendations.