(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.
A senior White House official said Trump will push for the swift confirmation of a new Supreme Court justice "before the midterm elections."
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.
"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.
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."