WASHINGTON — Supreme Court Justice Anthony Kennedy announced his retirement Wednesday, giving President Donald Trump the chance to cement conservative control of the high court.

The 81-year-old Kennedy said in a statement he is stepping down after more than 30 years on the court. A Republican appointee, he has held the key vote on such high-profile issues as abortion, affirmative action, gay rights, guns, campaign finance and voting rights.

Kennedy said he has informed his colleagues and Trump of his plans, and that his retirement will take effect at the end of July.

Trump praised Kennedy as a man of “tremendous vision” and said his search for a new justice would begin “immediately.”

Without Kennedy, the court will be split between four liberal justices who were appointed by Democratic presidents and four conservatives who were named by Republicans. Trump’s nominee is likely to give the conservatives a solid majority and will face a Senate process in which Republicans hold the slimmest majority, but Democrats can’t delay confirmation.

Trump’s first high court nominee, Justice Neil Gorsuch, was confirmed in April 2017. If past practice is any indication, Trump will name a nominee within weeks, setting in motion a process that could allow confirmation of a new justice by early August.

Senate Majority Leader Mitch McConnell says his chamber will vote this fall.

Says the Kentucky Republican, “It’s imperative that the president’s nominee be considered fairly and not subjected to personal attacks.”

Senate Minority Leader Chuck Schumer says it would be the “height of hypocrisy” for the Senate to vote on a new Supreme Court justice before the November midterm elections.

Schumer noted that Senate Republicans in 2016 refused to consider then-President Barack Obama’s court nominee, Merrick Garland, during the election year, leaving the seat vacant for President Donald Trump’s nominee of Neil Gorsuch in 2017.

Sen. Dick Durbin, D-Ill., said, “Senator McConnell set the new standard by giving the American people their say in the upcoming election before Court vacancies are filled. With so much at stake for the people of our country, the U.S. Senate must be consistent and consider the President’s nominee once the new Congress is seated in January.”

Trump already has a list of 25 candidates — 24 judges and Utah Sen. Mike Lee — and said he would choose a nominee from that list.

Prominent on that list are Judges Thomas Hardiman of Pennsylvania and William Pryor of Alabama, seriously considered for the seat eventually filled by Justice Neil Gorsuch, and Judge Brett Kavanaugh, who serves on the federal appeals court in Washington, DC.

Kavanaugh is a longtime Washington insider, having served as a law clerk to Kennedy and then as a key member of independent counsel Kenneth Starr’s team that produced the report that served as the basis for President Bill Clinton’s impeachment. In October, Kavanaugh dissented when his court ruled that an undocumented teen in federal custody should be able to obtain an abortion immediately.

Abortion is likely to be one of the flash points in the nomination fight. Kennedy has mainly supported abortion rights in his time on the court, and Trump has made clear he would try to choose justices who want to overturn the landmark abortion rights case of Roe v. Wade. Such a dramatic step may not be immediately likely, but a more conservative court might be more willing to sustain abortion restrictions.

Interest groups across the political spectrum are expected to mobilize to support and fight the nomination because it is so likely to push the court to the right.

Republicans hold a bare 51-49 majority in the Senate, although that includes the ailing Sen. John McCain of Arizona. If Democrats stand united in opposition to Trump’s choice, Senate Majority Leader Mitch McConnell of Kentucky can lose no more than one vote. If the Senate divides 50-50, Vice President Mike Pence could break a tie to confirm the nominee.

Regardless of who replaces him, Kennedy’s departure will be a massive change for the high court, where he has been the crucial swing vote for more than a decade. He has sided with the liberal justices on gay rights and abortion rights, as well as some cases involving race, the death penalty and the rights of people detained without charges at the Guantanamo Bay naval base. He has written all the court’s major gay-rights decisions, including the 2015 ruling that declared same-sex marriage is a constitutional right nationwide.

He also has been a key vote when conservatives have won major rulings on the outcome of the 2000 presidential election in favor of George W. Bush, gun rights, limiting regulation of campaign money and gutting a key provision of the landmark federal Voting Rights Act.

There were no outward signs that Kennedy was getting ready to retire. He had hired his allotment of four law clerks for the term that begins in October and he is planning to spend part of the summer as he typically does, teaching a law school class in Salzburg, Austria.

But several former law clerks said that Kennedy, a nominee of President Ronald Reagan, prefers to be replaced by a Republican. Control of the Senate is at stake in the November elections, and if Democrats capture the majority, Trump could find it difficult to get his choice confirmed.

Few obstacles seem to stand in the way of confirming Kennedy’s replacement before the court reconvenes in October. Republicans changed the rules during Gorsuch’s confirmation to wipe out the main delaying tactic for Supreme Court nominees, the filibuster, and the need for 60 votes to defeat it.

The other two older justices, Ruth Bader Ginsburg, 85, and Stephen Breyer, 79, are Democratic appointees who would not appear to be going anywhere during a Trump administration if they can help it.