COLUMBUS, Ohio (AP) — Statehouse Republicans in Ohio came up a single vote shy Thursday of reversing a same-party governor’s veto and imposing one of the most restrictive abortion laws in the country.

The outcome marked a victory for outgoing Republican Gov. John Kasich, a prospective 2020 presidential contender who has vetoed the so-called heartbeat bill twice in as many years. Kasich argued in a veto message last week that the law would be declared unconstitutional, but only after saddling the state with a costly court battle.

Republican Senate President Larry Obhof dismissed the cheers that broke out in his chamber after senators voted 19-13 to override the so-called heartbeat bill veto, when 20 votes were needed. The bill would have prohibited the procedure at the first detectable heartbeat, as early as six weeks into pregnancy.

“I think that the celebration for some of the people in here will be short-lived,” Obhof told reporters. “We will have a supermajority that is pro-life in both chambers in the next General Assembly — we’re getting sworn in in less than two weeks, and we have a governor coming in who has said he would sign that bill.”

Still, abortion rights activists bedecked in red and pink regalia claimed the vote as a victory. The bill’s author, Janet Porter, declined a request for comment.

The failing Senate vote followed a successful override count in the Ohio House. The chamber mustered exactly the 60 votes necessary, but only after swiftly swearing in the 80-year-old father of a former state representative to take his seat and cast the deciding vote.

“What you see continuously with this bill — with the last-minute pushes, the never full sets of hearings, always last-minute hijinks — really proves that they know they don’t have the will of the people with this bill,” said Jaime Miracle of NARAL Pro-Choice Ohio. “It is just too extreme. Without exceptions for rape and incest, a 6-week abortion ban is blatantly unconstitutional.”

That was what Kasich effectively said in his second veto message on the bill in as many years.

During the rare post-Christmas showdown, Ohio lawmakers did successfully override Kasich’s vetoes of two other bills, one expanding gun-owner rights and another he opposed because it increased the pay of elected officials, including some incoming state officeholders.

“The governor doesn’t always agree with the General Assembly’s decisions — and on these issues he profoundly disagrees — but he, of course, respects its role in the process,” spokesman Jon Keeling said in a statement.

The Ohio House declared early in the day that it didn’t intend to revisit Kasich’s 18-month-old veto protecting the Medicaid expansion allowed under the federal Affordable Care Act.

In one of the day’s extraordinary moments, it was a Democrat, state Sen. Mike Skindell, of Lakewood, who read the entirety of Kasich’s veto message on the gun bill on the Senate floor, as he argued for colleagues to let the veto stand. It was mostly Democrats who supported the veto Thursday, while Republicans provided the votes to override it.

The legislation shifts the burden of proof in self-defense cases from defendants to prosecutors, allows off-duty police officers to carry weapons and phases in pre-emption of many local firearms restrictions.

“Even though John Kasich used all his political power and even used political gamesmanship, he could not stop the Legislature from doing their job, and executing the will of the Ohio people,” the Buckeye Firearms Association said on its website.

Obhof said the bill has wrongly been roped into the national debate over gun violence, when most of its provisions bring Ohio law in line with a majority of other states. Sen. Bill Coley, a Cincinnati Republican, called the bill “very narrow.”

But State Sen. Peggy Lehner, of Kettering, was among Republicans who voted to let Kasich’s veto of the measure stand.

“We have a gun problem in this country and we need to recognize that,” she said.

Lawmakers’ seemingly easiest decision of the day was to override Kasich’s veto of a bill increasing benefits and insurance coverage for the families of slain public safety officers, which Kasich vetoed because of the pay raises it contained. Legislators in both chambers argued the raises were justified. Some said Kasich had paid his staff well and so the veto was hypocritical.