The Supreme Court ruled Friday that abortion providers in Texas can go ahead with their lawsuit challenging S.B. 8, the nation's most restrictive abortion law.
But the court declined to block enforcement of the law while the court battle continues, so the law remains in effect.
The ruling was a blow to Texas, which had sought to make the law nearly impossible to challenge in federal court. The state argued that abortion providers could not contest the law in advance but had to wait until they were sued for violating it.
Friday's ruling was only a partial victory for abortion providers, however. The court ruled that the federal government cannot pursue a separate lawsuit filed by the Justice Department that challenged the law. It also narrowed the field of possible defendants that can be sued in any lawsuits that go forward.
By a 5-4 vote, the court also said lawsuits cannot proceed against court clerks and some other Texas officials, including the attorney general. Chief Justice John Roberts and the court's three liberals — Stephen Breyer, Sonia Sotomayor and Elena Kagan — were the four who said those officials could be sued.
But by an 8-1 vote, the court said the challengers could sue state officials that license abortion facilities. Justice Clarence Thomas was the sole dissenter on that point.
The justices did not decide whether the Texas law violates the Constitution. That issue was not presented in the case, but the decision Friday clears the way for the issue to be litigated in the state. Because the law clearly violates existing Supreme Court abortion precedents, the challenges are likely to prevail.
In his partial dissent, joined by the three liberal justices, Roberts blasted the law as an attack on the court itself.
"The clear purpose and actual effect of S.B. 8 has been to nullify this Court’s rulings," Roberts wrote. "It is, however, a basic principle that the Constitution is the 'fundamental and paramount law of the nation,' and '[i]t is emphatically the province and duty of the judicial department to say what the law is.'"
"Indeed," Roberts continued, quoting from an 1809 case, "'[i]f the legislatures of the several states may, at will, annul the judgments of the courts of the United States, and destroy the rights acquired under those judgments, the Constitution itself becomes a solemn mockery.'"
"The nature of the federal right infringed does not matter; it is the role of the Supreme Court in our constitutional system that is at stake," he said.
Sotomayor wrote that the justices should have blocked the law and called the decision of the court a "dangerous departure from its precedents, which establish that federal courts can and should issue relief when a State enacts a law that chills the exercise of a constitutional right and aims to evade judicial review."
"By foreclosing suit against state-court officials and the state attorney general, the court effectively invites other States to refine S.B. 8’s model for nullifying federal rights," she wrote. "The court thus betrays not only the citizens of Texas, but also our constitutional system of government."
In a separate case argued Dec. 1, the court is considering whether to overturn Roe v. Wade, which could allow individual states to decide whether abortion will be legal. That case involves a challenge to a Mississippi law, now on hold, that would ban nearly all abortions after 15 weeks of pregnancy.
S.B. 8 bans abortion after doctors can detect a fetal heartbeat, about six weeks into a pregnancy. But because past Supreme Court rulings have said states cannot ban abortion before the age of fetal viability, around 24 weeks, Texas officials could not enforce the ban themselves.
The Texas law instead delegates enforcement to any person, anywhere, who can sue any doctor performing an abortion or anyone who aids in the procedure. Those suing can collect at least $10,000, potentially subjecting abortion providers to the prospect of repeated and ruinous lawsuits.
Texas argued that the law's opponents had no legal authority to sue the state, because S.B. 8 does not give state officials any role in enforcing the restriction.
"Federal courts don't enjoin laws, they enjoin officials who enforce the laws," the state's solicitor general said.
But the law's challengers, abortion providers in the state, sought to sue Texas judges and court clerks, describing them as "unquestionably connected to the enforcement of this new law; without them, the civil suits targeting the right to abortion could not be litigated, or even commenced."
The Supreme Court took up the Texas cases after twice refusing to block enforcement of the law while the two challenges worked their way through the lower courts. As a result, the number of abortions in the state dropped dramatically. Some clinics stopped providing abortions services, forcing women seeking the procedure to travel outside the state.
The Texas law faces other challenges. On Wednesday, a state court judge declared S.B. 8 unconstitutional but declined to immediately block its enforcement.
This story first appeared on NBCNews.com.