Bill heads to governor and if it becomes a law, any doctor who performed an abortion – except to save a woman’s life – could face three years in prison

A bill that would make performing an abortion a felony punishable by three years in prison passed the Oklahoma legislature on Thursday, shifting controversy surrounding the measure on to the state’s anti-abortion leader, Governor Mary Fallin.

The bill, which opposing legislators say is patently unconstitutional, is almost unprecedented in modern times: a near-total ban on abortion. If it becomes law, any doctor who performed an abortion, except to save a woman’s life, would face criminal prosecution and the loss of his or her medical license. Oklahoma currently has two licensed abortion clinics.

Fallin, who is widely thought to be under consideration as Donald Trump’s running mate on the Republican presidential ticket, has not publicly indicated if she will sign the bill. Her office has said she does not intend to comment until it can review the legislation.

Without her signature or veto, the measure will become law in five days.

The bill has generated unease even in Fallin’s own party. In April, 33 members of the Oklahoma house, including many conservatives, abstained from voting on the bill. On Thursday, a handful of senate Republicans voted against it.

Abortion rights advocates immediately indicated plans to challenge the measure in court, if it becomes law.

“This obviously unconstitutional bill will never withstand legal scrutiny,” said Ilyse Hogue, president of the reproductive rights advocacy group Naral Pro-Choice America, in a statement. “It is a shameful new low for the anti-choice movement.”

The bill is in direct conflict with the US supreme court ruling in Roe v Wade, the 1973 case that established the right to abortion. Specifically, Roe v Wade forbids states from banning abortion outright until the fetus is viable outside the womb, at about 24 weeks.

State senator Nathan Dahm, the Republican author of the Oklahoma bill, has indicated that sparking a court challenge that ends with the overturning of Roe v Wade is one of the goals of his bill.

It would not be the first time in recent years that a state went to court to challenge the fundamental tenets of Roe v Wade. In 2013, North Dakota banned abortions after 12 weeks and Arkansas banned the procedure after six weeks – before most women realize they are pregnant.

Both measures were immediately blocked in court, and the states undertook expensive battles to defend their laws. Those disputes ended in January, when the supreme court declined to hear arguments to reinstate either law.

Conservative states and lawmakers have flirted with bans on abortion before, usually with little success. Colorado Republican Cory Gardner, now a US senator, introduced a bill when he was a state senator that would have banned nearly all abortions and sentenced providers to 12 years in prison. It failed.

In the 1990s, Louisiana and Utah made attempts to ban abortion that ended with resounding losses in court.