It’s no exaggeration to say that the issue of the Supreme Court gave Donald Trump the presidency. Through scandal after scandal, evangelical voters—around 35 percent of the electorate and over half the Republican party—stood by the most sinful presidential candidate in history, because of the Supreme Court.

Now that he’s won, what happens now? To put it bluntly, that depends on who dies next.

1. Short Term: Reset

First, obviously, Justice Scalia’s seat will be filled by an ultra-conservative like William Pryor, who has called Roe v. Wade “the worst abomination in the history of constitutional law.” Trump has already provided a list of 11 Supreme Court candidates—written by the right-wing Heritage Foundation—and the Republican-led Senate will immediately move to confirm whoever he nominates.

It’s possible that Democrats will filibuster, of course. It remains to be seen what strategy Senator Charles Schumer, the new minority leader, will adopt: how much confrontation, how much collaboration. Certainly, after the unprecedented fiasco of the Garland stonewall, Schumer won’t be in the mood for compromise.

But in practice, the new justice will basically return the Court to where it was on Feb. 12, 2016. Pryor and others on the list are a bit to the right of Scalia—Pryor even called Miranda warnings one of the “worst examples of judicial activism”—but not so far to the right as to make a big difference. We’ll have the same 5-4 splits we used to have, with Justice Kennedy in between four conservatives (Roberts, Thomas, Alito, Scalia II) and four liberals (Ginsburg, Breyer, Kagan, Sotomayor).

In addition, the eight-person Court has thus far avoided taking on any controversial issues this term, eager to avoid further stalemates like last year’s punt on immigration. The only high-profile case on the docket is the transgender case from Virginia, which will insert the Court into the culture war of transgender students and gender-appropriate bathrooms. Since transgender itself is a blank slate, legally speaking, it’s hard to predict how the Court will rule.

But in general, the short-term effect of Trump on the Supreme Court will be more of a letdown than a revolution.

2. Long Term: Transformation

The real question is what happens after that, and that, unfortunately, takes us into the unseemly guessing game of Supreme Court deaths or retirements.

The Court’s elder liberals are much older than their conservative counterparts: Ruth Bader Ginsburg is 83 and Stephen Breyer is 78. By contrast, Clarence Thomas is 68 and Samuel Alito is 66. Justice Kennedy, considered the Court’s swing vote, is 80.

That means the next justice on the Court is much more likely to replace Justices Ginsburg, Breyer, or Kennedy. And that is when the massive transformation of the Supreme Court will take place.

Unless Trump goes off-script (always a possibility), that justice will also be cut from the ultra-conservative, “new federalist” cloth of Justice Thomas. Trump has already used the right’s standard language of “interpret[ing] the Constitution the way the Founders wanted it interpreted” but his picks from the Heritage Foundation list are to the right of the usual “originalist” figures. In fact, it is Justice Roberts, as a judicial conservative, who will be the swing vote between three or four liberals and three or four ultra-conservatives.

It’s important to be clear about what this means. Yes, particular issues will be affected. The federal right to marriage equality will almost certainly be overturned. So will Roe v. Wade. We will return to a country in which many rights are vastly different from state to state. (The exception is gun control, most forms of which will likely be banned nationwide under a broad reading of the Second Amendment.)

But the real impact is far more profound. Justice Thomas’s judicial philosophy would roll back most of the federal government as we know it today. According to his understanding of federalism, civil rights laws, environmental regulations, labor rules—anything that relies on the Commerce Clause of the Constitution for its basis—would probably be unconstitutional. If the Commerce Clause really means “regulate interstate commerce, but only in a narrow sense,” all those laws fail.

Take, for example, laws prohibiting racial discrimination. The constitutional basis of those laws is that businesses and other organizations are always involved in interstate commerce, even if they’re local, because that’s how capitalism works today. But in Justice Thomas’s stated opinions, that’s not good enough; the Commerce Clause only allows Congress to regulate commerce itself, not business activities related to it. Civil rights laws, therefore, are beyond the federal government’s constitutional power.

A similar theory applies to the First Amendment. For Justice Thomas, not only should the First Amendment be read narrowly, so as to permit prayers in school, aid to churches, and religious displays on public property, but he has written that the Establishment Clause only applies to the federal government, not to the states. That would mean that, say, Mississippi could officially become a Protestant Christian state, or a Southern Baptist state, or whatever its legislature chose. (There may, of course, be state constitutional barriers, but they could be amended.)

Justice Thomas has always been an outlier on this—even Justice Scalia rarely agreed with him, and Justice Alito only occasionally does. But with three or four Justice Thomases, our basic federal system would be transformed.

This is not a secret. There’s a reason the leading conservative legal organization is called The Federalist Society, or that “state’s rights” has been a justification for discrimination since before the Civil War. A Trump-packed Supreme Court could well return is to an antebellum notion of the roles of the state and federal governments.

Again, that’s not going to happen next year. But if there are multiple vacancies during Trump’s term, it is, in fact, quite likely.

3. Wildcard: The Rule of Law

Finally, the great variable in all this is how the judiciary, and the Supreme Court in particular, will act as a check on the Trump administration itself.

Many of Trump’s campaign promises, such as instituting a religious test for people wishing to enter the country, are clearly unconstitutional. His promise to resume and increase the use of torture violates international law, and if he “bombs the hell” out of places where ISIS is located, leading to thousands of civilian deaths, or if he kills the families of terrorists, he will have committed war crimes.

Likewise Trump’s overall authoritarianism, which, if translated into action, would threaten the rule of law as we know it. Civil liberties would be restricted as never before, with “stop and frisk” a national policy, surveillance of Muslim communities, and even, per Newt Gingrich’s proposal, a revival of the House Un-American Activities Committee.

Will the Supreme Court act as a check to Trump? In the past, the Court has failed to check executive power as often as it’s succeeded; in the 1944 Korematsu case, for example, the Supreme Court caved to executive power in a time of war, and allowed the federal government to place Japanese Americans in concentration camps. That case seems newly on point today, in light of Trump’s plans to deport 11 million people.

But it’s also possible that Chief Justice Roberts, in particular, could find in a stronger judicial role precisely the rehabilitation of the Supreme Court that he seems to be looking for. If the Chief Justice wants to improve the reputation of the Court, standing up for the rule of law is an excellent place to do so. And he would have the support of the Court’s liberal wing.

It’s not hard to imagine the Trump administration, or the Giuliani-led Department of Justice, triggering a constitutional crisis. Indeed, it’s hard not to imagine them doing so. The question is how the Supreme Court will respond—and how, in turn, President Trump will respond to them.