West Virginia Gov. Jim Justice announced Friday that he had signed a bill into law that prohibits nearly all abortions except in certain medical situations or in cases of rape or incest.

The GOP-led legislature passed House Bill 302 on Tuesday in a special session, making West Virginia the second state to pass a restrictive abortion bill after the US Supreme Court overturned Roe v. Wade.

The ban goes into effect immediately, with the bill’s criminal penalties to take effect in 90 days.

HB 302 allows exceptions for cases of rape or incest up to eight weeks of pregnancy for adults and the first 14 weeks of pregnancy for minors. The incident will need to be reported to law enforcement at least 48 hours before the abortion.

It also allows exceptions if the embryo or fetus is nonviable, a medical emergency exists or an ectopic pregnancy, a rare event in which the fertilized egg implants outside the uterus and cannot survive.

“I’ve done exactly what I said I would do – I’ve signed it,” Justice, a Republican, said at a news conference Friday morning.

Justice said he’s “proud that I signed it and I believe wholeheartedly that it does one thing that is absolutely so important – it does protect life.”

HB 302 had stalled in July when lawmakers failed to come to a consensus about key details of the bill. This week, when the legislature returned, abortion rights advocates slammed lawmakers for voting to ban abortion “after weeks of discussions behind closed doors.”

Since July, abortion had been legal in West Virginia up to 20 weeks of pregnancy, after a state court judge indicated that she had decided to block a state abortion ban dating to the 1800s.

Justice that month called lawmakers back for a special session and, at the last minute, added abortion to the legislative agenda.

“I said over and over and over that I stand strongly for life,” Justice said Friday. “But I also said we have to have reasonable, reasonable and logical exceptions.”

“And I really, truly believe that there’s reasonable and logical exceptions that they brought us. Now with all that, this is such a volatile, volatile bill. There’s people that are going – on either side – that are probably not going to get everything and anything that they wanted,” he said.

A person other than a licensed medical professional who performs an abortion in violation of the law would be subject to a felony and up to 10 years in prison.

Under the law, miscarriages, stillbirths, in vitro fertilization and medical treatment that results in accidental or unintentional death of a fetus are not considered abortions. The law does not prevent the sale and use of contraceptives. Abortion providers need to report abortions and are required to notify a minor’s parent before an abortion is performed.

It defines medical emergencies as a “condition or circumstance that so complicates the medical condition of a patient as to necessitate an abortion to avert serious risk of the patient’s death or serious risk of substantial life-threatening physical impairment of a major bodily function, not including psychological or emotional conditions.”

Alisa Clements, Planned Parenthood South Atlantic’s director of public affairs, argued that the law “will be deadly for the people of our state.”

“The limited exceptions in this bill are so narrow and so tightly restricted that it will make it extremely difficult for people in vulnerable situations — including minors and survivors of sexual assault — to get the care they need,” Clements said in a statement.