The Canadian government enacted a new law on Thursday that seeks to stem the rising death toll from opioids by allowing bystanders to report overdoses without fear of legal repercussion.

The Good Samaritan Drug Overdose Act ensures that anyone who calls 911 in case of an overdose, as well as those who are at the scene of the emergency, will be granted immunity from simple drug possession charges, or violations of parole, probation or pre-trial release orders. Other offenses like trafficking or driving while impaired are not exempted.

Liberal Member of Parliament Ron McKinnon introduced the law last year. Lawmakers gave it final approval earlier this week, clearing the way for it to receive royal assent on Thursday.

Canada, like the U.S., has been hit hard by opioids in recent years. The influx of increasingly potent heroin, often cut with synthetics such as fentanyl, led to thousands of deaths in 2016. Although nationwide data is hard to come by due to inconsistent reporting, 931 people fatally overdosed on illicit drugs last year in British Columbia alone, with the vast majority likely related to opioids. British Columbia is often referred to as the heart of the Canadian opioid epidemic.

Drug policy experts note that opioid overdose victims are often with others when they use drugs, and that these bystanders can play a crucial role in preventing fatalities.

“During an overdose, a call to 911 can often be the difference between life and death,” said Canadian Minister of Health Jane Philpott in a statement. “We hope that this new law, and the legal protection it offers, will help encourage those who experience or witness an overdose to make that important call, and save a life.”

Prior studies suggested that many people were fearful of seeking help in overdose situations. A 2012 survey of drug users by the Waterloo Region Crime Prevention Council found that 46 percent of respondents would either call 911 and leave an overdose victim, or not call at all. Nearly 60 percent of drug users cited concerns about getting in legal trouble, while others were afraid of being brought in for probation violations or of losing custody of their children.

“While this is not going to solve the [opioid] problem, it will reduce the impact of it,” said McKinnon, according to the Hamilton Spectator. “It’s one tool in a tool box. It will save lives and that’s the point.”

Although a number of U.S. states have passed 911 Good Samaritan legislation in some form or another, the nation as a whole has been slower to embrace this sort of approach to drug use and abuse.

In December 2016, the Canadian government officially adopted harm reduction as a core pillar of the national drug policy, expressing support for measures that “reduce the negative consequences of drug and substance use.”

Grant Smith, deputy director of national affairs with the Drug Policy Alliance, a nonprofit that advocates for drug law reform, hailed the new Canadian law and said that the U.S. should follow their example.