The Pennsylvania Supreme Court ruled Friday that a mother who uses drugs during pregnancy cannot be considered to have abused her newborn infant.

The ruling, which came after Superior Court urged the higher court to review the case of a Clinton County woman and her child, touches on a debate surrounding a particularly vulnerable population at the heart of the opioid crisis — the hundreds of Pennsylvania children born dependent on opioids because of their mother’s drug use during pregnancy.

Children and Youth Services in Clinton County argued that the mother abused her child by using drugs while pregnant. The woman’s attorneys, citing the opinion of numerous medical societies, countered that the state should not punish mothers, regardless of their drug use, for seeking prenatal care.

The court ruled that a mother who uses drugs during pregnancy cannot be deemed a perpetrator of child abuse because the law does not consider a fetus a child.

“The plain language” of state law, the court wrote, “requires the existence of a child at the time of the allegedly abusive act in order for the actor to be a ‘perpetrator’ and for the act to constitute ‘child abuse.’ ”

Two judges dissented, saying it only has to be proven that a parent committed a recent act that caused bodily injury, regardless of whether that act occurred before the child’s birth.

The woman from Clinton County, identified only by her initials, gave birth to a daughter in January 2017.

The mother, who had struggled with addiction, had been released from prison in 2016 and relapsed with opioid pain pills and marijuana. She learned she was pregnant about four months into her pregnancy, and initially sought treatment, first through a methadone maintenance program and then with buprenorphine.

Because opioid withdrawal can cause miscarriage, pregnant women are often prescribed opioid-based addiction treatments.

Shortly before she gave birth in mid-January, the woman relapsed again, testing positive for opiates, benzodiazepines, and marijuana. She again tested positive for buprenorphine and marijuana on the day she gave birth.

The baby began exhibiting symptoms of neonatal abstinence syndrome (NAS) — withdrawal caused by exposure to opioids in utero — at 3 days old and remained in the hospital for 19 days.

Juvenile Court granted CYS emergency custody of the child in early February. The agency had argued that the child was “without proper parental care or control” — hospital staff told the agency that the child’s parents had not consistently visited their daughter while she was being treated for NAS — and alleged that the mother had abused her child by using drugs while pregnant.

Juvenile Court ruled that it couldn’t establish that the mother had committed child abuse, since the mother had taken drugs before the child’s birth.

Months later, Superior Court unanimously reversed the decision, saying a mother’s drug use might constitute child abuse "if it is established the mother intentionally, knowingly, or recklessly caused or created a reasonable likelihood of bodily injury to a child after birth.”

But two justices on that court asked the Supreme Court to review the matter, warning that to define drug use during pregnancy as child abuse could deter women with substance-use disorder from getting treatment, or punish women for other actions taken during pregnancy.

One judge wrote that the ruling “could easily be extended to other areas of a pregnant woman’s decision-making (e.g., drinking coffee, traveling, eating sushi, or undergoing cancer treatment).”

Nearly a year after it agreed to review the case, the Supreme Court reversed the lower court’s decision, and, in the majority opinion, also was critical of Clinton County CYS’s argument that punishing drug use during pregnancy as child abuse could help protect children in the future.

“Labeling a woman as a perpetrator of child abuse does not prevent her from becoming pregnant or provide any protection for a later-conceived child while in utero,” the court wrote. “It also does not ensure that the same woman will not use illegal drugs if she does again become pregnant.”

Also, that label would have far-reaching consequences, the court wrote: A new mother deemed a child abuser would find it difficult to enter the workforce or participate in the child’s life, undermining family unity and “a supportive environment for the child.”

Staff writer Marie McCullough contributed to this article.