Virginia Gov. Ralph Northam issued his first pardon Friday, striking the conviction of a woman who was convicted of a crime after disposing of her stillborn fetus.

Katherine Dellis, 26, of Rocky Mount, Va., was found guilty in 2016 of concealing a dead body for throwing the fetus in the trash after having a miscarriage. She was sentenced to five months in jail.

Dellis’s conviction was decried by supporters of abortion and women’s rights and cheered by those who believe in affording greater rights to unborn children.

The treatment of fetal remains has been a major front in the abortion debate in recent years, although Dellis’s case did not involve an abortion.

Ofirah Yheskel, a spokeswoman for the governor, said Northam (D) made his decision after the state’s attorney general concluded Dellis should not have been prosecuted.

“Governor Northam agreed with the conclusion of the Attorney General and saw fit to pardon Ms. Dellis,” Yheskel wrote in an email.

Dellis and her attorney could not immediately be reached for comment Friday afternoon.

But Tarina Keene, executive director of NARAL Pro-Choice Virginia, applauded Northam’s move.

“I’m really excited for her,” Keene said of Dellis. “I think the governor reacted quickly to what we would describe as a terrible injustice.”

Abortion opponents did not immediately respond to requests for comment.

Earlier this week, Virginia Attorney General Mark R. Herring (D) issued an advisory opinion that the law Dellis was convicted of breaking does not apply to stillborn fetuses. Northam had requested the review.

The move was a reversal for Herring’s office, which had submitted a brief arguing for Dellis’s conviction to be upheld by Virginia’s Court of Appeals. The court upheld the conviction in April.

Herring has said that his office misstepped in the case. In a statement, he said, “Virginia law does not criminalize women who have a miscarriage.”

His office said the case had not been brought to Herring’s attention at the time of the appeal.

According to court papers, Dellis’s placenta separated from the wall of her womb in February 2016, triggering a miscarriage. Dellis passed out in her bathroom and awoke to find the stillborn fetus on the bathroom floor next to her.

Dellis cut the umbilical cord, wrapped the fetus in a bathmat and disposed of it in a garbage can, according to the court papers. She eventually sought medical care, and a doctor alerted authorities.

The remains were found in a dumpster, and a medical examiner performed an autopsy. It concluded the fetus was 30 to 32 weeks old.

A fetus of that age can be viable with the right care, but the examiner found that the fetus’s lungs had never been exposed to air and that it had died in the womb up to three days before the miscarriage.

Dellis was charged in Franklin County with concealing a dead body and eventually convicted.

She appealed her conviction on the grounds that the fetus “was never alive,” so “it cannot be dead,” but the appellate court rejected that argument. She did not appeal the case further.