On Wednesday, Justice Anthony Kennedy announced his retirement from the U.S. Supreme Court. Kennedy served on the court for 30 years, and sat on the 9th U.S. Circuit Court of Appeals for 13 years before that. He is 81 years old. His retirement gives President Donald Trump an opportunity to name a second justice, shifting the court to the right for a generation.

A lifelong Republican, Kennedy has frequently played the role of swing vote, sitting in-between the court’s liberal and conservative blocs. He cast votes against campaign finance reform, the Affordable Care Act, and the Voting Rights Act, frequently siding with the conservative justices on issues of workers’ rights and government regulations. Yet he famously sided with the liberals on several landmark abortion rights cases, preserving Roe v. Wade despite his personal opposition to abortion. And, perhaps most famously, he authored all four of the court’s landmark opinions on gay rights, including Obergefell v. Hodges, protecting same-sex couples’ right to marry.

Kennedy’s absence will mark a sea change in American jurisprudence. Without him, the Supreme Court may well rule that women have no constitutional right to abortion access. Courts may chip away at same-sex marriage or overturn it altogether. Voting rights plaintiffs will have little hope of winning their battles against voter suppression. Victims of race and sex discrimination will face much rougher sledding at the court.

This retirement sets up a huge battle in the Senate, where Republicans hold a slim majority. Trump is nearly certain to pick a doctrinaire conservative approved by the Federalist Society, the group that has selected most of his lower-court appointees. Republicans abolished the filibuster for Supreme Court nominees during the fight over Justice Neil Gorsuch, so Democrats cannot blockade Trump’s pick. It seems inevitable that Trump will eventually get his candidate on the court. Once there, he or she will have an opportunity to overrule myriad liberal precedents and reshape constitutional law for decades.