Supreme Court Justice Anthony Kennedy’s many swing votes over the years can make his ideology difficult to define. But his retirement, announced on Wednesday, gives the Trump administration an opening to dramatically shift the court to the right.

Kennedy’s resume might make his ideology seem straightforward. Before he became a judge, Kennedy worked as a Republican lobbyist in California. He was appointed to the federal bench by a Republican president, Gerald Ford, and to the Supreme Court by another, Ronald Reagan.

But his views proved much harder to put in a box.

Kennedy’s tenure at the high court was marked by his ability to cross ideological lines and serve as a deciding swing vote. He sided with the court’s liberals more frequently on issues involving LGBTQ rights, criminal justice, and, in some cases, abortion rights, including the recent Whole Women’s Health decision and the decision that legalized same-sex marriage.

But he has backed conservatives in decisions that blew up campaign finance restrictions and weakened the Voting Rights Act. He voted consistently against affirmative action before upholding the University of Texas’s race-conscious admissions policy in 2016.

As Mother Jones notes, however, Kennedy reliably sided with conservatives during this term:

The most recent court term has seen a host of contentious, high-stakes cases that have resulted in 5-4 decisions 17 times. In all 14 of those cases that have split along ideological lines, Kennedy has sided with the court’s conservative justices. His vote on Tuesday to uphold Trump’s travel ban followed his vote a day earlier to approve racial gerrymandering in Texas, and one three weeks prior to allow a business to discriminate against LGBT customers.

Kennedy’s ideology could be so hard to pin down that, in 2007, Garrett Epps and Dahlia Lithwick dubbed him “the sphinx of Sacramento” in an article for Slate:

Kennedy notoriously agonizes over the proper result in a case. Once he’s made his decision, observers suggest, the logic supporting it is secondary. That said, his opinions frequently include lofty language about freedom, morality, and privacy that renders them harder to reconcile with one another. Any time you start trying to define the very “heart of liberty,” consistency among your various cases becomes tricky.

It’s less likely that Trump will appoint anyone as ideologically flexible as Kennedy. Conservatives now push for more consistency from their nominees. Avoiding “another Kennedy” was a battle cry for the right as long ago as 2005, when President George W. Bush was picking a nominee for the Court.

Since then, the four justices chosen by Republican presidents — John Roberts, Samuel Alito, and Neil Gorsuch — have been consistently conservative.

Individual cases can always hold some surprises, such as Chief Justice John Roberts’s vote in NFIB v. Sebelius that preserved Obamacare in 2012. But Kennedy’s departure will still likely mean the end of whatever remained of a shaky center-left consensus he’s helped establish during his tenure. As Vox’s Dylan Matthews writes, that could result in the overturning of Roe V. Wade and rulings in favor of religious challenges to anti-discrimination law.

Correction: Due to an editing error, this story has been updated to reflect that NFIB v. Sebelius was the case that preserved Obamacare in 2012.