Supreme Court Justice Anthony Kennedy's decision to retire Wednesday might just end up being the most important part of his legacy.

Given his long history as the "swing vote" on the Supreme Court, this might sound incredible. After all, Kennedy authored or was a key vote on decisions that upheld gay rights, abortion rights, and more. But it's his retirement — coming during the Trump presidency, two years after Senate Majority Leader Mitch McConnell stole a court nomination from former President Barack Obama — that may end up being much, much more meaningful.

Kennedy, like Sandra Day O'Connor before him, brought a bit of balance to the court over the years. Yes, he was a Republican appointee — Ronald Reagan appointed him in 1988, ironically a presidential election year — and yes, it was clear that the balance generally tilted towards conservatives. Still, there was a sense that Kennedy's presence kept the court from tipping over all the way to the right.

His replacement will do no such thing. No one should believe otherwise. Assuming, as we should, that Trump's pick is confirmed by the Senate, American jurisprudence is about to undergo a profound revolution. Settled law is about to become, in many cases, quite unsettled.

That leads to the other part of this story: Kennedy's retirement won't just define his legacy, but could undo it entirely.

A court with Anthony Kennedy on it decided that it was wrong to make homosexual acts illegal — and then, just a few years later, decided the Constitution protected gay marriage. That will be hard to reverse, but not to undermine: A court that lacks Kennedy but does have Neil Gorsuch and Kennedy's replacement can be expected to chip away at gay rights wherever and whenever it can. Expect a lot more "religious liberty" cases in the next few years.

A court with Anthony Kennedy on it narrowed the scope of Roe v. Wade — Kennedy was never a liberal, despite the grumbling of conservatives who considered him one of many GOP-appointed traitors in the judiciary — but also preserved it as precedent. The odds have just increased that precedent will be struck down in the next few years.

A court with Kennedy on it upheld the death penalty, but also narrowed its scope a bit. He joined liberals in establishing that the penalty could not be used on the mentally ill, on those who committed their crimes while juveniles, or in cases that hadn't resulted in the death of a victim. A Trumpist court can probably be expected to knock down some of those restrictions.

What's more: A court with Kennedy on it sometimes looked beyond American borders as it weighed how to apply American law. Kennedy's willingness to think globally while judging locally drove his conservative detractors to wit's end. Going forward, the court's outlook is likely to be more cramped, hermetic, even provincial.

Kennedy's underlying philosophy could be found in the very last sentence of his short resignation letter to President Trump.

Please permit me by this letter to express my profound gratitude for having had the privilege to seek in each case how best to know, interpret, and defend the Constitution and the laws that must always conform to its mandates and promises. [Kennedy]

"Promises." It's a word that implies the Constitution has meaning beyond what its plain words say, that it's a document not just of law, but aspiration, of what Americans can be. Kennedy's conservative detractors have never believed in those promises, only in the mandates. It's why he could understand the Constitution to protect gay marriage even though it has nothing particular to say about LGBT people and their rights.

Kennedy's retirement at this particular moment means we're likely to lose those promises.

Though he was widely derided among Republicans, Kennedy's last act as a justice is to show them loyalty: He's retiring now, before the midterm elections, while the GOP still has control of the Senate and can easily, if closely, confirm any President Trump pick it desires. That's the kind of favor justices have long repaid to their party.

The Republican Party that gave Kennedy his seat, though, is not the Republican Party of 2018. It's angrier, more reactionary, more willing to strike down norms than it was during the Reagan-Bush era of the GOP. It's a party that won't settle for the precedents that Kennedy articulated and established. It's a party, in short, that's intent on undoing the better parts of his legacy.

Does Kennedy realize that? It's hard to believe he doesn't. So the coming undoing of that legacy won't be a tragedy for him — it was his choice. The balance he struck was always a chimera.