The pharmaceutical giant behind the blockbuster pain pill that triggered Canada's deadly opioid crisis has agreed to pay $20-million to settle a long-standing class-action lawsuit.

The proposed national settlement caps a legal battle that began a decade ago between Purdue Pharma, the maker of OxyContin, and lawyers representing as many as 2,000 Canadians who got hooked on the drug after their doctors prescribed it. The country's opioid epidemic traces its roots to the introduction of the prescription painkiller 21 years ago. From 2000 to 2015, more than 6,300 died in Ontario alone from overdoses related to opioids.

"We're happy we at least have something to offer to the class members after all this time," Halifax lawyer Ray Wagner said.

Story continues below advertisement

Read more: How a little-known patent sparked Canada's deadly opioid crisis

Read more: A Killer High: How Canada got addicted to fentanyl

The settlement, which must be approved by the courts, includes $2-million in compensation for provincial governments. The provinces' public drug programs spent $93-million in 2014 on medications to treat patients suffering from dependence on opioids, a 60-per-cent increase over four years, according to figures obtained by The Globe and Mail.

Mr. Wagner's law firm launched the class action in 2007 in Atlantic Canada and later joined forces with firms in Ontario and Saskatchewan representing people across the rest of the country who were introduced to the drug through a doctor's prescription.

The class-action accuses Purdue of knowing that anyone who took OxyContin would be at risk of becoming addicted to it and suffer withdrawal symptoms if they stopped. But at no time were these risks disclosed.

The settlement is not an admission of liability by Purdue. "The complaints stem from marketing activities that allegedly occurred primarily between 1996 and 2001," the company said in a statement.

Purdue and the owners of the Stamford, Conn.-based company, the Sackler family, amassed a fortune from OxyContin. Purdue generated $31-billion (U.S.) in revenue from the drug, and the Sacklers were included on Forbes Magazine's list of the richest American families in 2015, with an estimated net worth of $14-billion.

It was Purdue's marketing prowess that transformed the way doctors treat pain. Until the mid-1990s, opioids were used primarily for people with terminal cancer. But Purdue said its innovative pill would substantially improve the "efficiency and quality of pain management" because it did not need to be taken as frequently as other medications, according to documents filed with the Canadian Intellectual Property Office seeking to patent OxyContin. In 1996, Health Canada approved the drug to relieve pain that was moderate to severe.

Purdue distinguished OxyContin from its rivals by promoting its time-release formula – the pill was designed to be swallowed whole and digested over 12 hours. Company sales reps persuaded doctors to expand their use of opioids beyond treating cancer pain by pushing the notion that OxyContin posed a lower threat of abuse and dependence to patients than other, faster-acting painkillers, the lawsuit says. Doctors started prescribing OxyContin for everything from backaches to fibromyalgia, and the drug became the top-selling long-acting opioid in Canada for more than a decade.

OxyContin also became a lightning rod in the early 2000s, as reports of opioid dependence and overdoses exploded. But the nature and scope of Purdue's deceit did not become publicly known until May, 2007, when the company and three of its executives paid $634.5-million to settle criminal and civil charges against them in the United States for misbranding OxyContin as less addictive than other pain medications.

With questions mounting in Canada about OxyContin's role in the opioid crisis, Purdue pulled the drug from the market in 2012, just a few months before the patent was to expire. Purdue attempted to paint the problem as one of abuse, saying people were intentionally using the pills to get high.

OxyContin was popular not only with people who became dependent after their doctors prescribed it, but also with heroin users, because it could be crushed, snorted or injected for a quick high. A host of other, stronger drugs filled the void when it was taken off the market, including illicit fentanyl, which began appearing on Canada's streets in 2012.

"The people we represent in our class action were given the drug by their family physician and they were misinformed about the impact," Mr. Wagner said.

Story continues below advertisement

Jordan Grenier, 59, is one of them. The Oakville, Ont., resident has been drug-free for two years. But his previous dependency on prescription opioids cost him his career as a car salesman and he is now on disability. At one point, he was taking 80 milligrams of OxyContin twice a day after he injured his back unloading a truck in the late 1980s.

"The doctor told me at the time that this is a miracle drug and it is not addictive," he said.