Updated at 2:55 p.m. ET

Supreme Court Justice Anthony Kennedy announced his retirement Wednesday, setting the stage for what promises to be an epic political battle over his replacement.

A Trump nominee is likely to be far more conservative than Kennedy, who, though appointed by President Reagan, voted with the court's liberals in some key cases.

Kennedy, who will turn 82 next month, made the announcement the same day the court handed down its last pending opinion for the 2017-18 term. He said he would continue to serve through July 31 of this year.

Speaking from the Oval Office soon after Kennedy's announcement, President Trump said Kennedy has "been a great justice of the Supreme Court." Trump also said the process to replace Kennedy will "begin immediately." The president pointed to a list of potential nominees he put together and made public previously. "It will be somebody from that list," Trump said, adding "hopefully we will pick someone who is just as outstanding [as Kennedy]."

Trump also told journalists Wednesday that Kennedy came to the White House to meet with him prior to making his announcement. The president met with the Supreme Court justice for about 30 minutes, Trump said. The president also said he asked Kennedy for any recommendations as to his replacement but Trump would not reveal who Kennedy suggested.

In a separate statement, the White House described Kennedy as "a tireless voice for individual rights and the Founders' enduring vision of limited government. His words have left an indelible mark not only on this generation, but on the fabric of American history."

Speaking on the Senate floor, Senate Majority Leader Mitch McConnell, R-Ky., said "The Senate stands ready to fulfill its constitutional role by providing advice and consent on President Trump's nominee to fill this vacancy. We will vote to confirm Justice Kennedy's successor this fall."

A simple majority of 51 votes is required to confirm a Supreme Court nominee. Senate Republicans currently hold 51 seats. Sen. John McCain, R-Ariz., has been away from Washington, D.C., while he battles brain cancer, but Vice President Mike Pence could cast a tie-breaking vote if needed.

McConnell came under heavy criticism from Democrats for holding up President Barack Obama's nomination of Judge Merrick Garland before the 2016 presidential election, leading to President Trump's nomination of Justice Neil Gorsuch to fill the seat on the court open because of the death of Justice Antonin Scalia. McConnell is coming under immediate criticism from Democrats for pledging to confirm a nominee just before this year's midterm elections.

Sen. Chuck Grassley, R-Iowa, chairman of the Senate Judiciary Committee, issued a statement that encouraged the president "to choose a nominee with the credentials, intellect and commitment to the rule of law necessary to serve on the Supreme Court." Grassley also said he looks forward to having the nominee before the committee, which vets and approves federal judicial nominees, for a hearing "in the weeks ahead."

There is little doubt about Kennedy's mark on history. Quite simply, he remade the face of marriage in America. More than any other justice, he was responsible for the advancement of LGBT rights. He wrote four of the court's opinions on the subject over nearly two decades, and ultimately declared marriage between two people of the same sex a fundamental right protected by the Constitution.

"No union is more profound than marriage, for it embodies the highest ideals of love, fidelity, devotion, sacrifice, and family," Kennedy said in his opinion. "In forming a marital union two people become something greater than what they once were."

On a court that has become increasingly conservative, Kennedy's role has been pivotal. In 5-to-4 decisions, his vote has usually determined the outcome on some of the hottest legal and social issues of the day — not just gay rights, but abortion, campaign finance, gun rights, affirmative action, the war on terror and the death penalty.

President Trump has pledged to nominate a replacement who will almost certainly vote differently on many of these issues, putting some landmark decisions in jeopardy — from Roe v. Wade to the legalization of same-sex marriage.

That will please and reward conservative groups that have supported him. At the same time, it will galvanize opposition among Democrats, and potentially even some moderate Republicans.

The confirmation rules this time, however, will be different from the get-go. When Democrats threatened to delay Trump's first nominee, Neil Gorsuch, earlier this year, Republicans voted to exempt Supreme Court nominations from filibusters, which required a super-majority of the Senate to cut off debate.

So this time, the president will make his choice knowing that he only needs to get a majority of the Republican-controlled Senate to approve his nominee. And McConnell has proven adept at keeping his troops in line on judicial nominations.

Still, the pressure will be intense, and the stakes high.

If anyone has doubts about how different the court would likely be when a centrist conservative like Kennedy is replaced by someone more hard-line, there is the example of Justice Sandra Day O'Connor's retirement in 2006. President George W. Bush chose Samuel Alito to replace O'Connor, and the effect has been profound; O'Connor has even complained privately that Alito is systematically dismantling her legacy.

Perhaps the best example of that dismantling is in the area of campaign finance. O'Connor, onetime GOP leader of the Arizona Senate, voted to uphold landmark campaign finance legislation in 2003 — only to see the court reverse that decision seven years later, after Alito replaced her.

While O'Connor was on the court, a majority of justices continued to support legislation that regulated campaign fundraising. But after her retirement and the Alito appointment, Kennedy wrote the court's 5-to-4 decision in Citizens United, the 2010 case that remade the way campaigns at every level are conducted.

The decision unleashed an ever-growing flood of cash into political campaigns. It reversed a century-old understanding that had sought to prevent corruption by barring corporations, and later labor unions, from spending their general treasury funds on candidate elections.

For Kennedy, reversing that legal understanding from the early 1900s was the realization of a long-held view of free speech.

"Political speech is indispensable to decision-making in a democracy," Kennedy wrote in the Citizens United decision, "and this is no less true because the speech comes from a corporation rather than an individual."

In general, there is probably no greater example of Kennedy's approach to the law, and how it will almost certainly differ from President Trump's nominee, than the question of how to interpret the Constitution: whether the Founding Fathers intended their creation as a static document, bound by the literal meaning of its words, or whether those words represent concepts of liberty to be interpreted over time.

In a 2003 decision that struck down a Texas law criminalizing private homosexual conduct, Kennedy said that the Founders understood that they were writing a document for the ages.

"They knew time can blind us to certain truths," he wrote in Lawrence v. Texas, "and later generations can see that laws, once thought necessary and proper, in fact serve only to oppress."

The men and women on President Trump's list of potential replacements disagree with that view, for the most part. They side with the late Justice Antonin Scalia and his successor Justice Neil Gorsuch, as well as other conservatives on the Supreme Court today, who believe the nation is bound by the original intent of the Founders.

During his presidential campaign, in a bid for the support of social conservatives, Trump issued two lists totaling 21 names and pledged to pick his first Supreme Court nominee from those lists. He did just that in naming Justice Gorsuch to fill the open seat once occupied by Scalia.

People involved in that selection process say that the president intends to expand that list a bit now. He might add Judge Brett Kavanaugh from the U.S. Court of Appeals for the D.C. Circuit, and possibly former Solicitor General Paul Clement, a highly regarded Supreme Court advocate who served in the George W. Bush administration. Clement's main drawback in the president's mind, though, is said to be that he has no judicial track record to examine.

Back in consideration are some of the names on the previous list: Judge Thomas Hardiman, of the 3rd U.S. Circuit Court of Appeals, which covers Pennsylvania, Delaware, and New Jersey, and Judge Raymond Kethledge, who serves on the Sixth Circuit, which covers a large part of the Midwest. Hardiman was the runner-up last time and is known as a staunch gun rights advocate. All four are in their early 50s.

Copyright 2018 NPR. To see more, visit http://www.npr.org/.