Updated

A federal court Tuesday struck down Arizona's ban on abortions after 20 weeks of pregnancy absent a medical emergency.

The 9th U.S. Circuit Court of Appeals said the law violated a woman's constitutionally protected right to terminate a pregnancy before a fetus is able to survive outside the womb. "Viability" of a fetus is generally considered to start at 24 weeks. Normal pregnancies run about 40 weeks.

Nine other states have enacted similar bans starting at 20 weeks or even earlier. Several of those bans had previously been placed on hold or struck down by other courts.

Judge Marsha Berzon, writing for the unanimous three-judge panel on the San Francisco-based court, said such bans before viability violate a long string of U.S. Supreme Court rulings starting with the seminal Roe v. Wade decision in 1973.

The judge wrote that "a woman has a constitutional right to choose to terminate her pregnancy before the fetus is viable."

Gov. Jan Brewer signed the ban into law in April 2012 after it was approved by the Republican-led Legislature. Supporters said the law was meant to protect the mother's health and prevent fetuses from feeling pain. U.S. District Judge James Teilborg ruled it was constitutional, partly because of those concerns, but the 9th Circuit blocked the ban from going into effect until it ruled.

Lawyers representing Arizona argued that the ban wasn't technically a law but rather a medical regulation because it allowed for doctors to perform abortions in medical emergencies. Berzon rejected that reasoning and deemed the legislation a law banning abortions before a fetus is viable.

"The challenged Arizona statute's medical emergency exception does not transform the law from a prohibition on abortion into a regulation of abortion procedure," Berzon wrote. "Allowing a physician to decide if abortion is medically necessary is not the same as allowing a woman to decide whether to carry her own pregnancy to term."

Berzon was joined by judges Mary Schroeder and Andrew Kleinfeld.

Supporters of the ban vowed to keep fighting.

"Given the compelling and important interest Arizona has in protecting the health and well-being of expectant mothers from the dangers of abortions after 20 weeks and to protect children in the womb from needless and horrific imposition of pain, we will seek review from the United States Supreme Court," said Maricopa County Attorney Bill Montgomery, who argued in support of the ban before the court. "If the 9th Circuit cannot permit Arizona to act because of Supreme Court precedent, then the Supreme Court must change that precedent."

Republican State Sen. Kimberly Yee, who sponsored the legislation, said she "wasn't surprised" by the ruling because of the 9th Circuit's liberal reputation.

"I'm optimistic that the state will have a compelling argument if we move this before the Supreme Court," Yee said.

Yee said she is 20 weeks pregnant.

"I certainly have no doubt in my mind that the baby I'm carrying at 20 weeks is a life," she said.

The 9th Circuit's ruling is binding only in the nine Western states under the court's jurisdiction, and Idaho is the only other state in the region with a similar ban. A federal judge earlier declared Idaho's ban unconstitutional.

Janet Crepps, a lawyer who argued against the ban in court for the Center for Reproductive Rights, said the ruling Tuesday affirmed a woman's right to an abortion before viability.

"These laws are all unconstitutional," she said. "This is not a close legal question at all. These laws are unconstitutional."