Transcript for Supreme Court Justice and crucial swing vote Anthony Kennedy is retiring
Reporter: In these times that are so deeply divided on aourt that's split along partisan lines, justice Anthony Kennedy was the man in the middle. And today after three decades on the bench, a surprise announcement he is stepping down sent shock waves through the nation. We really have to take our hats off to justice Kennedy. Thank you very much. We have to pick one that's going to be there for 40 years, 45 years. Reporter: Kennedy now leaves president trump the ability to shape the highest court in the land for years to come. It was a shock today to learn of justice Kennedy's retirement, and we now know that the person who replaces him, whoever it might be, will affect American life maybe for decades to come. Reporter: Justice Kennedy hand delivered his resignation to the white house addressed to "My dear Mr. President." In it he expressed his profound gratitude for what he called the privilege to seek in each case how best to know, interpret, and defend the constitution. At 81 years old, Kennedy's tenure spans six presidential administrations, the longest term of any sitting justice. Justice Kennedy has really kind of -- sort of held the keys to all of these major decisions. So there hasn't really been another swing vote like him. Reporter: Kennedy was sworn in in 1988 after being nominated by president Ronald Reagan. In landmark case after case, Kennedy became the crucial swing vote, deciding major issues that defined American law and shaped American life. Swing vote. I hate that term. The cases swing, I don't. Reporter: Cornell university law professor Michael Dorff previously served as law clerk for justice Kennedy. There were no easy cases. He liked to approach each case with an open mind. That meant that he would sometimes agonize. Justice Kennedy looked at each issue as it presented itself and he also was very clear that he could evolve on issues. Reporter: He sided with conservatives plenty. He's a staunch gun rights supporter. He wrote the opinion that allowed corporate America unlimited spending on political campaigns. But on many issues, his decisions surprised people. On race he was formerly a strong opponent of affirmative action. He recently upheld atermtive action in college admissions. In a remarkable series of cases over the course of almost two decades, Kennedy championed the civil rights of gay and lesbian Americans. In his 2015 ruling that legalized gay marriage in America, Kennedy wrote with deep feeling of gay couples who sought the right to marry. They ask for equal dignity in the eyes of the law, the constitution grants them that right." There have been four big, important cases in the last 25 years. And he's written all of them. So I think his legacy is very bound up with the sort of expansion of kind of constitutional equality on the basis of sexual orientation. Reporter: On abortion, in 1992, the justice surprised the country as the key vote reaffirming roe versus wade as the law of the land. Though subsequently he has voted to restrict it. The next president will, in effect, determine the balance of the court for what could be the next quarter century. Reporter: Since before he was elected, president trump made abortion and the supreme court one of his campaign's major issues, vowing to overturn roe versus wade. In 2016 the candidates were asked where they want the court to take the country. The supreme court, it's what it's all about. Our country is so, so -- just so imperative that we have the right justices. I am putting pro-life justices on the court. Reporter: Pro-life and pro-choice groups are already reacting to the news of Kennedy's retirement. Planned parenthood saying the right to access abortion in this country is on the line. While concerned women for America hailed this opportunity as quote the moment conservative women have been waiting for, the chance to return justice to the nation's highest court. And as advocacy groups hunker down for what they say will be a battle for the heart of this country, the president and congress are gearing up for a grueling confirmation process. This is the most important supreme court vacancy for this country in at least a generation. Reporter: Senate majority leader Mitch Mcconnell is already vowing to confirm Kennedy's successor by fall before the midterm election. The senate stands ready to fulfill its constitutional role by offering advice and consent on president trump's nominee to fill this vacancy. Reporter: But Democrats are still seetssing over the last time there was a supreme court opening, insisting a vote should wait until after the electorate votes. Millions of people are just months away from determining the senators who should vote to confirm or reject the president's nominee and their voices deserve to be heard now as leader Mcconnell thought they should deserve to be heard then. Anything but that would be the absolute height of hypocrisy. Reporter: In 2016 when justice Antonin Scalia died suddenly, it was Mcconnell who blocked a vote on Barack Obama nominee Merrick Garland until after the presidential election. He never had the opportunity for a hearing, let alone a vote. So the senate Republicans successfully kept that seat vacant. And it was a gamble that paid off. Reporter: And then he orchestrated a change in senate rules, the so-called nuclear option, to get president trump's pick, Neil Gorsuch, confirmed with a simple majority vote after Democrats triggered that move. The Democrats shot themselves in the foot. They were the people who argued for eliminating the filibuster on justices. And they got their way. And the bottom line is that all that a nominee will need is 50 votes. Plus the vice president. And that nominee will win. Reporter: Those 50 votes could come a number of ways, with 51 Republicans in the senate. All eyes are on the conservatives who have voted against the party line sometimes. And those Democrats who defied their party too when they voted for Gorsuch. We will begin our search for a new justice of the united States supreme court that will begin immediately. Reporter: Last year the white house put out a list of 25 conservative judges they would consider for the supreme court. Excellent list of great talented, highly educated, highly intelligent, hopefully tremendous people. He wants to choose somebody that will make conservatives think, whatever doubts they may have about any other aspects of Donald Trump, he got us a conservative supreme court. Reporter: My colleague Jon Karl talked to the man who helped the president come up with this list, Leonard Leo, the long-time head of the conservative federalist society. Should we expect to see a justice like Scalia or Alito? Like Gorsuch? I think you'll see a justice like Neil Gorsuch. Reporter: This week, Neil Gorsuch, the president's first pick, cast a key vote upholding the trump travel ban. Now the president will choose the replacement for Gorsuch's mentor, that man in the middle on whom so much has been riding for so long. For "Nightline," I'm Terry Moran in Washington, D.C.
This transcript has been automatically generated and may not be 100% accurate.