Associate Justice Anthony Kennedy’s announcement that he will retire from the Supreme Court on July 31 will likely trigger a confirmation battle the likes of which hasn’t been seen since the hotly contested nominations of Clarence Thomas and Robert Bork.

President Trump’s previous pick, Neil Gorsuch, was confirmed in a fairly close 54-45 vote, and he was considered to be a conservative replacing another conservative, Antonin Scalia -- meaning he wouldn’t significantly change the court’s balance.

Kennedy, however, has long been considered the court’s swing vote, and if he were replaced by a justice who consistently votes with the conservatives, that could change the results of numerous cases.

The 81-year-old Kennedy is the longest-serving on the court, chosen by Ronald Reagan and confirmed unanimously by the Senate in 1988.

There are, indeed, a number of areas where Kennedy has not followed the “conservative” line. Maybe nowhere has this been clearer than in cases dealing with sexual orientation. For example, he wrote the majority opinion in Romer v. Evans (1996) that states homosexuals and bisexuals can’t be singled out by a statute that would deny them protected status under the law.

Later, he wrote the majority opinion in Lawrence v. Texas (2003), overturning precedent and striking down state sodomy laws. Then, in one of his best-known opinions, Obergfell v. Hodges (2015), he declared in the 5-4 decision that same-sex couples have a right to marry.

While these battles may seem like old ones today, the Supreme Court is almost certain to face cutting edge legal questions regarding gender and sexuality in upcoming years, and whoever replaces Kennedy could likely make the difference in those decisions.

No matter who takes Kennedy’s place, the nominee will have a big robe to fill, and may face the resistance seen in the nominations of Bork and Thomas.

Robert Bork was nominated for associate justice of the Supreme Court by President Ronald Reagan on July 1, 1987, to replace the retiring Lewis Powell. Women’s rights groups and civil rights activists vehemently opposed Bork’s nomination, setting off a fevered debate in the United States Senate. The Senate denied Bork’s confirmation, and the vacant seat went to Kennedy, who was approved by the Senate 97–0.

Associate Justice Clarence Thomas also experienced a rocky road to his seat on the high court.

In 1991, President George H.W. Bush nominated Thomas to replace the retiring Thurgood Marshall. Thomas’ confirmation hearings began on Sept. 10, 1991, and, after the conclusion of the hearings, Anita Hill’s interview with the FBI was leaked and the hearings were re-opened. Thomas defended himself against Hill’s accusations that he made sexual comments to her. Thomas was confirmed on Oct. 15, 1991, with a 52–48 vote.

Another landmark opinion where Kennedy agreed with the court’s liberals was Boumediene v. Bush (2008). It was his 5-4 majority opinion that declared foreign terrorist suspects held at Guantanamo had the right to challenge their detention in U.S. courts.

And in Kennedy v. Louisiana (2008) he once again led the liberal bloc, writing a 5-4 majority opinion that declared the death penalty is unconstitutional in cases where the victim is not killed and there is no intent to kill (the particular case dealt with the rape of a child).

But often he’d stymie the wishes of the left.

The most famous example would almost certainly be his controversial 5-4 majority opinion in Citizens United v. FEC (2010). The case held that certain spending restrictions — on unions, corporations and some other groups — for money that would promote political speech before an election, are unconstitutional under the First Amendment.

Democrats had been hoping to overturn the ruling. Indeed, Hillary Clinton explicitly campaigned on this issue during her 2016 presidential bid. But with Donald Trump able to pick a replacement for Kennedy, the odds over Citizens United being overturned are far less likely.

Of course, these are examples of cases Kennedy authored. Just as important for American jurisprudence are opinions he merely joined.

For example, in Planned Parenthood v. Casey (1992) Justice Kennedy signed on to the decision which reaffirmed the fundamental right to an abortion under Roe v. Wade. For years many had hoped the original opinion would be set aside, but this seemed to end the issue. (Not that Justice Kennedy believed any limitation on abortion was disallowed — in Gonzales v. Carhart (2007), he wrote the majority opinion which found The Partial-Birth Abortion Ban Act of 2003 to be constitutional.)

In fact, Kennedy has often been a deciding vote on an array of controversies — his legal views have shaped the court’s jurisprudence on issues such as gun control, the death penalty, hate speech, religious freedom, environmental law, criminal procedure, affirmative action and, in the latest Supreme Court term, labor law and travel bans.

So when President Trump nominates Kennedy’s replacement, particularly with the GOP holding a bare majority in the Senate and elections coming up, the spotlight will be intense. So intense, a candidate who can’t withstand it may wilt.