Washington (CNN) Justice Anthony Kennedy , a conservative who provided key votes for same sex-marriage, abortion access and affirmative action, will retire from the Supreme Court.

The retirement is effective July 31, Kennedy said in a letter to President Donald Trump on Wednesday.

Kennedy's decision to step down could transform the Supreme Court for generations. Trump will have his second opportunity to nominate a justice and will likely replace Kennedy with a young, conservative jurist. That would create a bloc of five staunch conservative justices who could move the court further to the right and cement a conservative majority for the foreseeable future.

The nomination battle will likely ignite a firestorm on Capitol Hill as it comes just a year after Republicans changed the rules of the Senate in order to push through the nomination of Justice Neil Gorsuch, Trump's first nominee.

Trump said he has held Kennedy in high esteem, and that a search for a replacement will begin immediately.

"He's been a great justice of the Supreme Court," Trump said, later adding, "He is a man who's displayed great vision, he's displayed tremendous vision."

Trump and Kennedy met shortly before the announcement was made.

"(We) had a very deep discussion. I got his ideas on things," Trump said in the Oval Office. "I asked him if he had certain people he had great respect for that could potentially take his seat."

Senate Majority Leader Mitch McConnell, who blocked President Barack Obama's nomination of Merrick Garland in 2016 until the presidential election was held, paving the way for Gorsuch, said the Senate will move quickly.

"We will vote to confirm Justice Kennedy's successor this fall," McConnell said Wednesday.

The court opening is also likely to drastically alter both parties' approaches to November's midterm elections. Republicans, in particular, hope the vacancy activates a base that the party has worried would sit out this year's contests.

The timing couldn't be worse for the five Democratic senators up for re-election in states Trump won by double digits: Sens. Joe Donnelly of Indiana, Claire McCaskill of Missouri, Jon Tester of Montana, Heidi Heitkamp of North Dakota and Joe Manchin of West Virginia. If those five vote against Trump's nominee, they'll hand Republicans a potent issue to hammer them with. If they vote for the nominee, they risk severe retribution from within the Democratic Party.

Recalling McConnell's action, Democrats have begun calling for a delay until after the midterms.

"Sen. McConnell set the new standard by giving the American people their say in the upcoming election before Court vacancies are filled," said Illinois Democratic Sen. Dick Durbin. "With so much at stake for the people of our country, the US Senate must be consistent and consider the President's nominee once the new Congress is seated in January."

"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," said Senate Minority Leader Chuck Schumer, D-New York. "Anything but that would be the absolute height of hypocrisy."

The swing vote

Kennedy, 81, controlled the outcome of cases on hot-button issues like no other justice in recent history, as he often was the "swing vote" between the four liberal justices and the four more conservative justices.

A Ronald Reagan appointee who took the bench in 1988, Kennedy's most lasting legacy will most likely be in the area of gay rights. In 2015, in it was Kennedy who penned Obergefell v. Hodges, the landmark opinion that cleared the way for same-sex marriage nationwide.

Photos: Supreme Court Justice Anthony Kennedy Photos: Supreme Court Justice Anthony Kennedy Anthony Kennedy, the longest-serving member of the current Supreme Court, has announced that he will be retiring at the end of July. Kennedy, 81, was appointed by President Ronald Reagan in 1988. He is a conservative justice but has provided crucial swing votes in many cases. Hide Caption 1 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy was born in Sacramento, California, on July 23, 1936. In this photo, circa 1939, he sits between his mother, Gladys, and his sister, Nancy. Hide Caption 2 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy wears his Cub Scout uniform as he poses with his brother, Tim, circa 1946. Hide Caption 3 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy, third from right in the front row, stands with other Cub Scouts in the 1940s. Hide Caption 4 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy, right, spent time with the California Army National Guard after finishing law school in 1961. The man on the left, John J. Hamlyn Jr., also became a lawyer like Kennedy. Hide Caption 5 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy, right, and Hamlyn pose for a photo after basic training. Hide Caption 6 of 38 Photos: Supreme Court Justice Anthony Kennedy After more than a decade as a lawyer, Kennedy became a judge on the US Court of Appeals in 1975. He was nominated by President Gerald Ford on the recommendation of California Gov. Ronald Reagan. Hide Caption 7 of 38 Photos: Supreme Court Justice Anthony Kennedy This courtroom photo of Kennedy was taken in 1976. Hide Caption 8 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy has breakfast with his wife, Mary, and his son Gregory in 1984. Hide Caption 9 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy and his wife walk together in Sacramento, California, in 1987. Hide Caption 10 of 38 Photos: Supreme Court Justice Anthony Kennedy From 1965 to 1988, Kennedy was also a professor of constitutional law at the University of the Pacific's McGeorge School of Law. Hide Caption 11 of 38 Photos: Supreme Court Justice Anthony Kennedy In 1987, Kennedy was nominated by President Reagan to fill the Supreme Court seat vacated by Lewis Powell's retirement. The nomination came after the confirmation failures of nominees Robert Bork and Douglas Ginsburg. Hide Caption 12 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy, center, talks with US Sens. Ted Kennedy, left, and Joe Biden before a confirmation hearing in Washington. The two Kennedys are not related. Hide Caption 13 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy meets with President Reagan in the Oval Office. Hide Caption 14 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy is joined by his wife as he is sworn in by Chief Justice William Rehnquist on February 18, 1988. Reagan is on the right. Hide Caption 15 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy, top right, appears in a formal Supreme Court portrait in April 1988. In the front row, from left, are Thurgood Marshall, William Brennan Jr., Chief Justice William Rehnquist, Byron White and and Harry Blackmun. In the back row, from left, are Antonin Scalia, John Paul Stevens, Sandra Day O'Connor and Kennedy. Hide Caption 16 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy speaks at the McGeorge School of Law in 1991. He delivered the inaugural address in a lecture series named for the late Archie Hefner, whose portrait is behind Kennedy. Hefner was a prominent Sacramento attorney active in numerous civic and charitable groups. He died in 1988. Hide Caption 17 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy is on the far right in this Supreme Court portrait from 1998. In the front row, from left, are Antonin Scalia, John Paul Stevens, Chief Justice William Rehnquist, Sandra Day O'Connor and Kennedy. In the back row, from left, are Ruth Bader Ginsburg, David Souter, Clarence Thomas and Stephen Breyer. Hide Caption 18 of 38 Photos: Supreme Court Justice Anthony Kennedy In 2004, Kennedy speaks to high school students at the Ronald Reagan Presidential Library in Simi Valley, California. Hide Caption 19 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy speaks during a Senate subcommittee hearing in 2002. Hide Caption 20 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy discusses the court's budget requests with a House committee in April 2005. Hide Caption 21 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy participates in a panel discussion in Washington in November 2005. Hide Caption 22 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy receives an honorary degree at New York University in May 2006. Hide Caption 23 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy delivers the commencement address at New York University. Hide Caption 24 of 38 Photos: Supreme Court Justice Anthony Kennedy In February 2007, Kennedy testifies at a Senate committee hearing on judicial security and independence. Hide Caption 25 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy testifies before a House subcommittee in March 2007. He and fellow Justice Clarence Thomas spoke about concerns with the ongoing remodeling of the court building, the reduction of paperwork due to electronic media, and the disparity of pay between federal judges and lawyers working in the private sector. Hide Caption 26 of 38 Photos: Supreme Court Justice Anthony Kennedy The Supreme Court meets with President Barack Obama and Vice President Joe Biden in September 2009. From left are Samuel Alito, Ruth Bader Ginsburg, Kennedy, John Paul Stevens, Chief Justice John Roberts, Obama, Sonia Sotomayor, Biden, Antonin Scalia, Clarence Thomas, Stephen Breyer and retired Justice David Souter. Hide Caption 27 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy leaves after a Catholic Mass in Washington in October 2009. Hide Caption 28 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy joins the President and other officials at a memorial for the victims of a shooting in Tucson, Arizona, in 2011. Hide Caption 29 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy smiles as he is introduced to faculty members at the University of Pennsylvania Law School in October 2013. Kennedy was teaching there for a week. Hide Caption 30 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy is saluted by sailors as he tours the USS John C. Stennis in 2015. Hide Caption 31 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy testifies about a Supreme Court budget request during a House subcommittee meeting in 2015. Hide Caption 32 of 38 Photos: Supreme Court Justice Anthony Kennedy President Obama greets Kennedy and other Supreme Court justices before his final State of the Union address in January 2016. Hide Caption 33 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy, second from left, joins other Supreme Court justices in February 2017 during President Donald Trump's first address to a joint session of Congress. Hide Caption 34 of 38 Photos: Supreme Court Justice Anthony Kennedy As President Trump looks on, Kennedy administers the judicial oath to new Justice Neil Gorsuch in April 2017. Hide Caption 35 of 38 Photos: Supreme Court Justice Anthony Kennedy Kennedy and Trump walk together after Gorsuch's swearing-in ceremony. Hide Caption 36 of 38 Photos: Supreme Court Justice Anthony Kennedy Trump stands with the Supreme Court at Gorsuch's formal investiture ceremony in June 2017. From left are Elena Kagan, Samuel Alito, Ruth Bader Ginsburg, Kennedy, Chief Justice John Roberts, Trump, Gorsuch, Clarence Thomas, Stephen Breyer and Sonia Sotomayor. Hide Caption 37 of 38 Photos: Supreme Court Justice Anthony Kennedy Several members of the Supreme Court pose for a portrait before taking part in a procession to mark Harvard Law School's bicentennial in October 2017. On the top row, from left, are Kennedy, Roberts, Breyer and Gorsuch. In front of them are Kagan and retired Supreme Court Justice David Souter. Hide Caption 38 of 38

"They ask for equal dignity in the eyes of the law and the Constitution grants them that right," Kennedy wrote.

Personal dignity and liberty are constant themes in Kennedy's jurisprudence as well as the limitation of federal power over the sovereignty of the states.

Kennedy disliked the label of "swing vote," but he did side with his conservative colleagues on issues such as campaign finance, gun control and voting rights. He also cast a vote with conservatives in Bush v. Gore, the 2000 case on disputed electoral results that cleared the way for the presidency of George W. Bush.

Kennedy authored the majority opinion in Citizens United v. FEC striking down election spending limits for corporations and unions in support of individual candidates -- an opinion that liberals and Democrats on the campaign trail vowed to overturn.

To the dismay of conservatives, however, he joined the liberals on the court in other areas.

JUST WATCHED Justice Kennedy harshly critiques Trump Replay More Videos ... MUST WATCH Justice Kennedy harshly critiques Trump 00:58

Kennedy voted to reaffirm the core holding of Roe v. Wade in 1992, only to vote to uphold a federal ban on a particular abortion procedure in 2007.

Nine years later, he sided once again with the liberals on the court to strike down a Texas law that abortion rights supporters thought was the strictest nationwide. Without Kennedy's vote, the law would have been allowed to go into effect, inspiring other states to pass similar legislation.

In the same term, Kennedy pivoted on the issue of affirmative action when he voted for the first time in favor of a race- conscious admissions plan at a public university.

After that term, former acting Solicitor General Neal Katyal said, "It is very much Justice Kennedy's court."

"You can't understand how important his affirmative action opinion is without understanding his earlier jurisprudence," Katyal said. "For decades, he has been the court's most eloquent voice on the need to be color blind -- why he changed his mind is something historians will debate for decades."

Kennedy also wrote the decision striking down the death penalty for juvenile offenders in Roper v. Simmons.

He reflected on his role in close decisions in a 2010 interview.

"If the case is close 5-4 and let's say you are on the side that prevailed with the majority, there are not a lot of high-fives and back slaps. There is a moment of quiet, a moment of respect, maybe even sometimes awe in the process. We realize that one of us is going to have to write out a decision which teaches and gives reasons for what we do."

JUST WATCHED Trump reacts to Justice Kennedy retirement Replay More Videos ... MUST WATCH Trump reacts to Justice Kennedy retirement 01:16

Who's on the shortlist?

Trump Wednesday said he would select a replacement from the list of possible justices that he released during his campaign.

"We have a very excellent list of great, talented, highly educated, highly intelligent, hopefully tremendous people," he said in the Oval Office. "I think you see the kind of quality that we're looking at when we look at that list."

Possible top-tier candidates include Judge Brett Kavanaugh of the U.S. Court of Appeals for the D.C. Circuit and Judge Raymond M. Kethledge of the 6th US Circuit Court of Appeals, who are both former clerks of Kennedy. Judge Thomas Hardiman of the 3rd Circuit was interviewed by the President as a runner-up for the Antonin Scalia seat.

Also in the mix are individuals who Trump has already nominated for lower court seats. That includes Judges Amul Thapar and Joan Larsen, who sit on the 6th Circuit. Thapar has the support of Senate GOP leader McConnell.

Another potential is Amy Coney Barrett, who Trump nominated for a seat on the 7th Circuit.

And a wildcard is Utah GOP Sen. Mike Lee, a conservative who was on Trump's list.

Asked if he'd be interested in the job Wednesday, Lee noted that he "started watching Supreme Court arguments for fun when I was 10 years old."

"I would not say no," Lee said.

Although for many years Kennedy served as the most important vote on the court, he was only the third choice of President Reagan in 1987. The Senate rejected Robert Bork after contentious hearings.

Judge Douglas Ginsburg dropped out after admitting he had smoked marijuana when he served as a law professor for Harvard.

But Reagan praised his choice when he introduced him to the country, calling Kennedy "that special kind of American who's always been there when we needed leadership."

Like Reagan, Kennedy lived his early life in California. He was a Catholic who was raised in a Republican family in Sacramento, and attended Stanford and Harvard Law School.

Kennedy is married to Mary Davis, and has three adult children.

This story is breaking and will be updated.