(CNN) Under a new North Carolina law, a drug dealer who illegally sells a controlled substance that causes someone's death could be charged with second-degree murder.

The "death by distribution" act, signed into law Monday by Gov. Roy Cooper, allows prosecutors to charge dealers with a Class B2 felony , which carries a penalty of up to 40 years in prison, if they have a previous unlawful distribution conviction.

If not, they could face a Class C felony charge, which includes other crimes such as first-degree kidnapping and carries a maximum of up to 20 years in prison.

The law takes effect on Dec. 1.

The legislators behind the bill say the harsher penalty will deter dealers and combat the opioid epidemic.

Critics say the law could deter people from seeking help

However, opponents believe the law could prevent people from reporting an overdose to 911.

"We're very concerned with the way and manner in which this bill impacts the Good Samaritan law ," which protects people experiencing a drug overdose or people who witness an overdose and seek medical assistance for a victim from criminal prosecution, North Carolina Harm Reduction Coalition's Virgil Hayes told CNN.

The final version of the bill states that "nothing in this section shall be construed to restrict or interfere with the rights and immunities provided under" the Good Samaritan law.

"Research by the CDC shows that any law that threatens or increases fear that bystanders will be incarcerated or criminalized decreases the likelihood of bystanders contacting 911 at the scene of an overdose," Hayes said, referring to the Centers for Disease Control and Prevention.

"The majority of those charged under this law in other states that already have it are not high-end traffickers that they are targeting. There's no evidence that these laws are in fact effective at curtailing drug trafficking."

The North Carolina Medical Society worked with legislators to amend the bill so it wouldn't "inadvertently punish physicians for following the standard of care for their patients," spokeswoman Elaine Ellis said in a statement to CNN.

"We will stay vigilant as this law is enacted to make sure it achieves its stated goal of going after gang members. As we continue to battle the opioid epidemic, it is vital for North Carolina to focus on and invest in treatment of this insidious disease," Ellis added.