(CNN) Ohio Gov. John Kasich vetoed a measure that would have outlawed abortions after a fetal heartbeat is detected while approving a law that prevents them after 20 weeks of pregnancy.

The vetoed proposal, commonly referred to as the " heartbeat bill ," would have been the nation's strictest time-based legislation, banning abortions around six weeks.

But abortion rights advocates said the 20-week ban is troubling on its own, the latest abortion restriction passed under Kasich's watch.

Pro-life advocates, meanwhile, welcomed the decisions as a step closer to challenging Roe v. Wade, the landmark Supreme Court decision that made abortion legal nationwide.

A veto 'in the public interest'

Current state law , which Kasich signed in 2011, forbids abortions of what the statute calls viable fetuses, or fetuses that can survive outside the womb. Abortions beginning at 20 weeks' gestation require a doctor's finding that the fetus is not viable. Exceptions are made in cases where the woman's health is at serious risk.

The new regulations, which take effect in 90 days, eliminate the viability test and simply ban abortions after 20 weeks. Abortion providers alleged to have violated the law will be charged with a fourth-degree felony. The woman's-health exception still applies.

Kasich said he vetoed the heartbeat amendment to avoid lengthy and costly litigation that was likely to end in defeat, based on recent case law. Similar measures passed in Arkansas and North Dakota were found to unconstitutional in federal court, he noted in his veto message. Provisions of the heartbeat bill were "clearly contrary" to the Supreme Court's current rulings on abortion.

"Such a defeat invites additional challenges to Ohio's strong legal protections for unborn life," he wrote. "Therefore, this veto is in the public interest."

Ohio Right to Life President Mike Gonidakis agreed that the heartbeat bill was destined to fail, given the current Supreme Court's makeup.

"While it must have been difficult, the current makeup of a radically pro-abortion Supreme Court required the governor to exercise great restraint," Gonidakis said.

"By endorsing the 20-week ban in lieu of the heartbeat approach, Gov. Kasich provided strong pro-life leadership to finally engage a winnable battle with the federal judiciary while saving countless babies at the same time."

A 'shameful attempt' to outlaw abortion

The new law makes Ohio the latest state this year to pass a 20-week ban on abortions, following Georgia and South Carolina

Forty-three states restrict abortions, with some exceptions, by time or phase of fetal development. Some of those states prohibit abortions after a doctor determines the fetus is viable. There's no fixed time period in such laws, but the nonprofit American Pregnancy Association says that viability generally can begin as soon as 24 weeks. Other states prohibit abortion after a certain time following conception.

Demonstrators took to the streets in early December after Republican Ohio lawmakers passed the legislation.

State legislators had considered the bill in previous years but it never passed the Senate. Donald Trump's election, and a presumption that he'll appoint conservative Supreme Court justices, spurred Ohio Republicans to pass the measure, a legislator said when the amendment passed.

President-elect Trump has expressed interest in reversing the 1973 Roe v. Wade ruling, saying opposition to abortion would be a criterion for nominating justices.

Abortion rights advocates cautioned against viewing the heartbeat bill veto as a significant gain when weighed against the 20-week ban, and accused Kasich of using smoke and mirrors to outlaw abortion.

"He may hope that by vetoing a six-week ban -- which would have virtually banned abortion with almost no exceptions -- he comes off as moderate. But Ohio women see right through this and reject this extreme agenda," Dawn Laguens, executive vice president of Planned Parenthood Action Fund, said in a statement.

"The 20-week ban will force women to travel long distances and cross state lines in order to access safe, legal abortion -- a barrier that many women simply cannot afford. This is just another shameful attempt by John Kasich to make abortion illegal."