Over his 30 years on the Court, Antonin Scalia’s name became synonymous with conservative jurisprudence, and especially with the school of thought that calls upon judges to seek the original meaning of constitutional provisions. But Scalia’s principles could also lead him to some surprising results: On contentious issues such as whether the First Amendment protects flag burning, whether criminal defendants have a right to confront witnesses against them, and what sorts of police searches are “reasonable,” Scalia would sometimes break ranks with other conservative justices.

For that reason, progressives were pinning their hopes on Scalia to play the role of unlikely savior in one of the term’s most contentious cases: Friedrichs v. California Teachers Association. (While often the swing vote, Justice Kennedy’s comments during oral argument in a similar case two years ago indicated he was likely to vote against the union.) A ruling against the state and union defendants would be a major blow, perhaps the most significant one in a decades-long conservative effort to defund America’s public-sector labor unions by reversing Abood v. Detroit Board of Education, a 1977 decision which held that public-sector employees could be required to pay a so-called fair-share fee to the union that represents them. While no one would call him a great friend of organized labor, Scalia was the most likely swing vote in Friedrichs; Court-watchers saw his prior opinions as an endorsement of the union’s position. But Scalia had also characterized mandatory union fees as an “undeniably unusual” “tax” levied on public employees by private unions in a 2007 case, so his vote was no sure thing.

On the day Friedrichs was argued, those hoping for signs of a union-friendly Scalia left the Court severely disappointed. With his trademark gusto, Scalia tore into core arguments made by the union and government attorneys. Conservative pundits could barely contain their joy, while liberals began editing their obituaries for the American labor movement.

But with news of Scalia’s passing on Saturday, a new question emerged: Assuming Justice Scalia was indeed part of a five-justice majority to hold mandatory union fees unconstitutional, what will become of Friedrichs? There are two possibilities. First, sometime between now and July, the Court could hand down a 4-4 decision. A tie goes to the victor in the lower court, and in this case the union won handily before the Ninth Circuit Court of Appeals, which simply applied Abood. Second, the Court could hold the case over for re-argument once a new justice is confirmed. But the Court may be unwilling to leave Friedrichs and other close cases undecided while a confirmation battle plays out—especially because that battle seems to be shaping up to last a year or more.

At minimum, then, Abood is nearly certain to remain good law through the 2016 election. That alone is a victory for public unions, which will not be forced to divert member dues away from political activity in the middle of a presidential-campaign season.

If the Court does set Friedrichs for re-argument—or if the issue reaches the Court again in another case, as it is likely to do—then the outcome will all be down to the new Justice. A Justice appointed by a Democrat is much more likely to vote to uphold Abood than one appointed by a Republican, though there are no guarantees. For example, Judge Sri Srinivasan, a likely President Obama nominee, has decided several First Amendment cases during his two and a half years on D.C. Circuit, but none addressing union fees. Still, Srinivasan voted to reject free-speech challenges to commercial-disclosure requirements, as well as against First Amendment protection for a public-school teacher who sent an email criticizing school conditions to Chancellor Michelle Rhee. These votes bode well for public-sector unions, though extrapolating from cases in which appellate judges are bound to apply Supreme Court precedent can be perilous. Conversely, potential Republican nominees, such as former Solicitor General Paul Clement, are more likely to follow in the steps of Justice Samuel Alito, who has been remarkably hostile to public unions.

If Abood stands—either because of a 4-4 decision or because a new Justice provides the fifth vote to affirm it—it will not spell the end of challenges to public-sector unions. Cases with the potential to chip away at organized labor will continue to reach the courts in significant numbers no matter what, and they will proliferate if the next justice is a Republican appointee. More important, states may still adopt “right-to-work” laws banning mandatory union fees, as the West Virginia legislature voted to do last week, or to eliminate collective bargaining for public employees altogether. Thus, a favorable decision in Friedrichs will not eliminate contentious fights over union rights—it will just move them to state governments, which increasingly lean Republican.

At the same time, unions may be left in a stronger position for having been through the Friedrichs crucible, assuming they emerge victorious. First, public unions responded to Friedrichs by redoubling their efforts to connect with represented workers, successfully convincing tens of thousands of them to become members. Those gains, and the infrastructure that facilitated them, will presumably remain in place. Second, blue-state lawmakers had already begun rethinking union rights in a post-Friedrichs world. For example, a Hawaii bill would partially fund collective bargaining through the state, while also allowing unions to experiment with charging non-members à la carte for their services. And, California responded to a 2014 Supreme Court decision eliminating fair-share fees for home health-care workers by giving unions the right to make a presentation at new employees’ mandatory orientation. Similar proposals may yet take hold, even if the Friedrichs threat is eliminated. Especially given that robust union representation is associated with higher pay for public employees, then, one indirect consequence of Friedrichs may turn out to be greater disparities in public-sector wages and working conditions among the states.

So what next for unions? It largely depends on what happens between now and November in the take-no-prisoners battle over Scalia’s replacement. With well-funded, conservative groups filing dozens of constitutional challenges to labor-friendly public-policy regimes, unions have a proverbial Sword of Damocles hanging over them. Replacing Scalia with another conservative justice would almost certainly bring it crashing down. A replacement by Obama, Clinton, or Sanders would likely remove the threat for now, and, depending on who the replacement is, could leave unions with the most labor-friendly Supreme Court since the 1960s.