A federal court in Arizona has upheld the state's ban on abortions after 20 weeks, allowing it to come into effect on August 1. The ruling has already set off further legal challenges that are likely to center on one question: Where does the line get drawn between an abortion restriction and an all-out ban?

Ever since Roe v. Wade, the Supreme Court has allowed states to ban abortions after the fetus is viable - usually thought to be around 23 or 24 weeks - as long as such restrictions have an exception for the health or life of the mother. The Supreme Court has not allowed bans prior to that point in pregnancy.

The American Civil Liberties Union had challenged the Arizona law as unconstitutionally limiting women's access to abortions prior to the fetus' viability.

In the ruling today, Judge James Teilborg does not dispute that viability standard. He recognizes that pre-viability bans are not constitutional. But he concludes that Arizona's law is not a ban at all. Because it makes certain exceptions for abortions "to avert a pregnant woman's death or avoid a serious risk of substantial and irreversible impairment of a major bodily function."

"Accordingly, [the law] does not purport to ban all abortions past 20 weeks gestational age," Teilborg concludes. "Further, the statue allows for abortions up to and including 20 weeks gestational age. As such, [it] is not a ban on previability abortions."

That interpretation, ACLU attorney Alexa Kolbi-Molinas argues, ignores the standing case law on abortion rights. She points to a passage of Planned Parenthood v. Casey, a 1996 lawsuit on abortion rights, where the Supreme Court specifically took on the issue of exceptions to previability abortion bans. They found  that states could pass certain restrictions on previability abortions; they could create waiting periods, for example, or require patients' to read certain medical materials.

what they could not do was prohibit previability abortions "regardless of whether exceptions are made for particular circumstances."

"It doesn't dispute the Supreme Court on the viability standard," says Kolbi-Molinas. "It acknowledges it exists. He says its not a ban because there are some exceptions. That completely ignores Casey."

Seven states have passed laws in the past two years that ban abortions at or around 20 weeks, usually on the basis that the fetus could feel pain (the research on this is disputed). While many states already ban late-term abortion, they tend to do so later in the pregnancy, often around 24 weeks, thought to be after viability. These new bans move that restriction up significantly earlier.

Arizona's law was the first of these laws to be challenged in court. And, as of a few hours ago, it's the first that a federal court has upheld.

The American Civil Liberties Union plans to appeal this decision to the Ninth Circuit Court of Appeals. It will also request an emergency stay of the regulation, to bar it from coming into effect later this week. The full text of the Arizona decision is included below.