Republican Ohio Gov. John Kasich has signed a bill into law that would imprison doctors who perform an abortion method commonly used during the second trimester, but vetoed another bill that would have banned abortion after six weeks.

"I'm pro-life," Kasich said at the bill's signing Wednesday, according to the Cincinnati Enquirer. "I think the issue, whether you're pro-life or you're pro-choice, is moving in the direction of the earliest the better and not the latest."

The ban he signed into law would affect abortions 12 weeks into a pregnancy or later that use a method known as dilation and evacuation. Doctors perform these types of abortion by using surgery tools and suction to remove a fetus from the womb.

The bill he signed does not have exceptions for incest or rape, but it does allow for an abortion if a woman's pregnancy endangers her life. Doctors who break the law will face up to 18 months in prison.

Mississippi and West Virginia also have bans on dilation and evacuation, according to the Guttmacher Institute, an organization that studies abortion and other reproductive policies. Alabama and Texas have laws that were struck down by the courts, and challenges are being litigated in Arkansas, Kansas, Kentucky, Louisiana, and Oklahoma.

It’s possible the question over dilation and evacuation will reach the Supreme Court under the new lineup, which has become more conservative under President Trump.

Kasich vetoed legislation dubbed the "heartbeat bill," which would have banned abortion as early as when a fetal heartbeat could be detected, at around six to eight weeks. The governor said the bill violated Roe v. Wade, the Supreme Court decision that legalized abortion up to fetal viability, generally considered to be 24 weeks into a pregnancy.