Governor Mary Fallin of Oklahoma on Friday vetoed a highly contentious proposal to all but ban abortion in the state. The vetoed bill would have made it a criminal felony punishable by three years in prison for any doctor to perform an abortion.

Fallin, a Republican who has signed 18 anti-abortion measures, cited the fact that the bill was vague and likely to be struck down in court.

For a governor widely considered to be under consideration as Donald Trump’s vice-presidential pick, the veto represents a rare break from her state party. The measure passed the statehouse on Thursday with broad support from Fallin’s party, but several Republicans nevertheless voted against the bill or abstained.

Reproductive rights groups decried the bill as unprecedented and dangerous, and even local, neutral groups, such as the Oklahoma state medical association, aired deep concerns. The bill made an exception only when the mother’s life was in danger, but as Fallin noted on Friday, its language was vague on what constituted a life-threatening situation.

Fallin had until five days after the bill’s passage to sign or veto it, or it would have automatically become law.

There are just two abortion clinics in Oklahoma – one in Tulsa and one in Norman, a suburb of Oklahoma City. A third is slated to open in Oklahoma City this summer.

Immediately after the bill passed the statehouse on Thursday, abortion rights groups warned that the measure was patently unconstitutional and doomed in the event of a court fight.

“This law doesn’t really have a chance of standing up in court because it’s so clearly been established by the supreme court time and time again that every woman has a fundamental right to abortion,” said Genevieve Scott, a staff attorney for the New York-based Center for Reproductive Rights.

A woman stands with other members of Bound 4 Life, an anti-abortion group, at the state capitol in Oklahoma City. Photograph: Sue Ogrocki/AP

Scott said the center has taken Oklahoma to court eight times in five years over abortion laws it considers unconstitutional, including a law that requires women to wait 72 hours between their initial appointment with an abortion provider and the procedure itself. It has won every case that has been permanently resolved.

“Governor Fallin did the right thing today in vetoing this utterly unconstitutional and dangerous bill,” said Nancy Northup, president and chief executive of the Center for Reproductive Rights.

“But the reality is countless Oklahoma women still face incredible obstacles to access safe and legal abortion when they’ve made the decision to end a pregnancy.”

Oklahoma’s latest attempt to curtail abortion was in direct conflict with the US supreme court ruling in Roe v Wade, the 1973 case that established the right to abortion. Roe and subsequent cases that upheld it forbid states from banning abortion outright until the fetus is viable outside the womb, which occurs at about 24 weeks.

The author of the Oklahoma bill, Republican state senator Nathan Dahm, said one goal of the bill was to incite a court challenge that ended with the overturning of Roe v Wade.

The Liberty Counsel, a far-right legal advocacy group, helped Dahm write language that it hoped would bring about such a challenge.

“This particular bill puts a target on Roe v Wade,” Mat Staver, the group’s founder, told the Washington Post. “It is Oklahoma’s line in the sand on the sanctity of human life.”

Had the bill gone to court, it would not have been the first attempt to overturn Roe by blatantly violating its tenets. In recent years, states such as North Dakota, Colorado and Mississippi have attempted ballot measures that would establish “personhood” and all its legal protections as beginning at conception.

In 2013, North Dakota banned abortions after 12 weeks and Arkansas banned the procedure after six weeks – before most women realize they are pregnant.

But strategies for attacking Roe v Wade head-on are a source of division within the anti-abortion movement, with proponents of an incremental approach to limiting abortion claiming they are largely ineffective.

Legacy groups such as Americans United for Life and the National Right to Life Committee typically withhold support for personhood amendments and first-trimester bans on abortion, and their members sometimes speak out explicitly against such measures.

In several states where anti-abortion lawmakers have attempted to ban the procedure once a provider can detect fetal heart tones, at about six weeks, Right to Life has actually contributed to their defeat. James Bopp Jr, a prominent anti-abortion attorney, has criticized personhood measures as “doomed to expensive failure”.

Arkansas and North Dakota’s first-trimester abortion bans both failed in court after long, drawn-out legal battles that only ended this year.

Between 2012 and 2014, North Dakota paid just shy of $250,000 to defend its ban in state and federal court. The law was permanently struck down this year, at which point a federal court ordered the state to pay another $245,000 to the Center for Reproductive Rights, which North Dakota’s only abortion clinic hired to defeat the law.

The center also won more than $69,000 in attorneys’ fees from the state of Arkansas after defeating that state’s 12-week abortion ban in court.

According to the Guttmacher Institute, a pro-abortion rights thinktank, the Oklahoma proposal was just one of more than 400 bills introduced in the first quarter of 2016. This year, the state’s lawmakers also considered banning abortion due to fetal anomaly.

Oklahoma passed a bill last year banning a common method for second-trimester abortion. Following a legal battle with the Center for Reproductive Rights, it was blocked in court.