By Jon Herskovitz and Heide Brandes

(Reuters) - Oklahoma's Republican Governor Mary Fallin vetoed a bill calling for prison terms of up to three years for doctors who performed abortions, saying the legislation would not withstand a criminal constitutional legal challenge, her office said on Friday.

The bill, which was approved a day earlier in the Republican-dominated legislature, would have made performing an abortion a felony. It also called for revoking the license of any doctor who conducted one.

The bill allowed an exemption for an abortion necessary to save the life of the mother.

“The bill is so ambiguous and so vague that doctors cannot be certain what medical circumstances would be considered ‘necessary to preserve the life of the mother,’” Fallin said, in a statement from her office, where she was described as "the most pro-life governor in the nation."

Abortion rights groups had promised a bruising legal battle if the bill were signed into law, which would have resulted in an expensive legal battle.

Cash-strapped Oklahoma is battling a $1.3 billion budget hole that has caused it to cut education funding and other state programs.

Had the bill been approved, the state would have been the first to use its codes of professional conduct to implement a measure that would effectively serve as an abortion ban, according to the Guttmacher Institute, which backs abortion rights but whose data is used by both sides of the debate.

Other states that have tried to impose outright abortion bans after the Supreme Court’s landmark 1973 Roe v. Wade decision have seen their laws struck down by courts, it said.

Supporters have said the bill could withstand a legal challenge because the state was within its rights to set licensing requirement for doctors.

Legal experts have said the U.S. Supreme Court has ruled that abortion is legal in the United States and Oklahoma must abide by the court's decision.

Since Fallin took office in 2011, Oklahoma has been one of the leaders in adding restrictions to abortions.

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

(Reporting by Jon Herskovitz in Austin, Texas and Heide Brandes in Oklahoma City; Editing by Jonathan Oatis)