The blockbuster Supreme Court term that just ended was a (nearly) unmitigated disaster for movement conservatives. Chief Justice John Roberts declined to overturn precedent on abortion rights. Conservative activist Justice Neil Gorsuch showed he would join the court's liberals when the statutory text tells him to. The natural question then is, what's next? What are the implications for the future of the court?

The short answer is that the court's future direction is in flux like no other time in recent memory. And what happens next will be determined by the 2020 election and the justices' health.

The first crucial point here is that, had Roberts and Gorsuch not crossed the court's ideological lines in the most high-profile cases of the term, we would be looking at an extremely conservative court for the foreseeable future, regardless of the outcome of the November vote.

The court has five conservative justices who — until this term — seemed capable of acting as an unassailable voting bloc for the indefinite future. (The oldest, Justice Clarence Thomas, is only 72.) This bloc was formed after Senate Majority Leader Mitch McConnell and the Republican Senate blocked a confirmation vote on Judge Merrick Garland during the Obama administration, allowing a newly elected President Donald Trump to appoint Gorsuch. The retirement of Justice Anthony Kennedy, a swing voter who repeatedly delivered liberal-friendly results on issues like gay rights, abortion, and Guantánamo, then allowed Trump to appoint Justice Brett Kavanaugh, who is (so far) a much more reliable conservative.

This conservative majority was the first on the court in nearly a century, and conservative activists anticipated that it would overturn Roe v. Wade and hold the line on cultural issues like transgender rights.

Instead, the opposite happened. Without Kennedy on his left, Roberts chose to become the swing voter himself — and saved Planned Parenthood v. Casey, the 1992 decision co-authored by Kennedy, Justice Sandra Day O'Connor, and Justice David Souter that itself declined to overturn Roe. The blow to prolife conservatives is utterly devastating. This was their best shot, and they missed it.

Then Gorsuch, with Roberts and the four liberals joining him, held that employment anti-discrimination law applies not only to gays and lesbians but also to transgender people. This, too, was a body blow to movement conservatives, who had invested considerably in opposing transgender rights even after losing the same-sex marriage issue because of Kennedy.

For conservatives, the only way out of their newly weakened position is to re-elect Trump and keep the Senate Republican. Then they would have to hope for retirements from Justices Ruth Bader Ginsburg (87) and Stephen Breyer (81). If Trump picked even one strong conservative, they would probably have the votes to overwhelm Roberts on abortion. If Trump got two, they could roll back Gorsuch's Title VII ruling, too.

If Joe Biden is elected, the question then becomes whether the Senate goes Democratic at any time during his presidency. Under McConnell's rules, it seems basically certain that if the Senate remains Republican, Biden would not be able to get even one justice onto the court. That would mean Ginsburg and Breyer would try to stay on — and concern about their health, already pressing for court-watching liberals, would continue to be a major preoccupation. (Ginsburg was hospitalized Tuesday to treat a possible infection; headlines ensued.)

If one or both of them had to step down, the court would be reduced to eight or seven members indefinitely — a phenomenon I've called the incredible shrinking Supreme Court. A 4-3 conservative majority including Gorsuch could potentially repudiate Roberts and overturn Roe; but the three stalwart conservatives couldn't touch Gorsuch's Title VII decision.

However, if Biden is elected and gets a Democratic Senate, it's widely expected that Ginsburg and Breyer will retire and be replaced by like-minded liberals. That would maintain essentially the current configuration on the court. The power of the swing vote would lie with Roberts and occasionally Gorsuch. The liberals would not be able to count on any major new wins, but they also wouldn't have to panic about major rollbacks or the overturning of settled precedent.

The wild card here is Thomas. He will not willingly step down if a Democratic president is in a position to replace him with a liberal. If he has to, however, the court's balance will change radically: There would likely be a 5-4 liberal majority for the first time since the 1960s. The probability of that happening is low, but for conservatives it remains the nightmare scenario.

The takeaway is that the best laid plans of political movements focused on the Supreme Court's personnel have a tendency to go awry.

One of the most famous liberals ever named to the Supreme Court, Felix Frankfurter, ended up as a judicial conservative (although he insisted that he never changed, as Roberts surely also would insist). Putative conservatives like Kennedy and O'Connor (both appointed by Ronald Reagan) and Souter (appointed by George H.W. Bush) ended up writing important liberal decisions.

Now Roberts (George W. Bush) and Gorsuch (Trump) can be added to the list of justices who didn't do what was expected of them.

But while it's tough to know in advance how a new justice will vote, one thing is clear: The consequences of the 2020 vote on the Supreme Court, and the country, could not be greater.

Noah Feldman, a professor of law at Harvard University, is a Bloomberg Opinion columnist. This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.