Because the case rested on federal constitutional issues, putting the question before voters, as Albuquerque did in November, was not legally viable, said the Maricopa County attorney, Bill Montgomery, one of the law’s most ardent defenders. (The Albuquerque referendum, which sought to ban abortions at 20 weeks of fertilization, was defeated by a 10-point margin.)

Arizona officials conceded that the law covered abortions before fetal viability, currently about 24 weeks as measured from a woman’s last menstrual period. But they argued that the law did not amount to an outright ban, only to a permissible regulation, one they said was justified by the state’s interest in preventing fetal pain and the increased risk to women as their pregnancies progress. The appeals court rejected both arguments.

In the concurring opinion, Judge Andrew J. Kleinfeld questioned the constitutional significance of fetal viability, calling it “an odd rule, because viability changes as medicine changes.” Since the Roe decision, viability has dropped from about 28 weeks, he wrote, as doctors become able to save ever younger premature babies.

Judge Kleinfeld added: “Were the statute limited to protecting fetuses from unnecessary infliction of excruciating pain before their death, Arizona might regulate abortions at or after 20 weeks by requiring anesthetization of the fetuses about to be killed, much as it requires anesthetization of prisoners prior to killing them when the death penalty is carried out.”

Arizona is one of 12 states that have tried to ban most abortions at 20 weeks based on the theory of fetal pain, according to the Guttmacher Institute. But the other states have set the threshold at 20 weeks after fertilization, about two weeks later in a pregnancy than Arizona’s cutoff, but still earlier than fetal viability. Such laws have been struck down in Georgia and Idaho but remain in effect in nine states where they have not been challenged in court.

In urging the court to hear the Arizona case, Horne v. Isaacson, No. 13-402, officials there told the justices that the small number of challenges was an effort by abortion rights advocates to make sure there was no split among the lower courts, a factor that often figures in the Supreme Court’s decision to hear a case.