Supreme Court Justice Anthony M. Kennedy has announced his retirement. 

After a year of rumors, Kennedy formally announced his retirement on Wednesday and will step down on July 31 after 30 years on the bench. His absence will give President Donald Trump a chance to build a Supreme Court that could stay solidly conservative for another generation. 

Trump said the search for Kennedy's replacement will "begin immediately."

Although he is typically conservative, Kennedy has sided with the liberal judges on several pivotal issues. Should the president replace Kennedy with someone who is more conservative, the decisions Justice Kennedy made possible with his swing vote in these four cases could be reversed:

Same-Sex Marriage

Kennedy sided with liberal justices Ruth Bader Ginsburg, Sonia Sotomayor, Elena Kagan and Stephen Breyer to strike down the ban on same-sex marriage in 2015. In his opinion, Kennedy argued the ability to marry is a constitutional right. 

"No union is more profound than marriage, for it embodies the highest ideals of love, fidelity, devotion, sacrifice, and family. In forming a marital union, two people become something greater than once they were. As some of the petitioners in these cases demonstrate, marriage embodies a love that may endure even past death. It would misunderstand these men and women to say they disrespect the idea of marriage. Their plea is that they do respect it, respect it so deeply that they seek to find its fulfillment for themselves. Their hope is not to be condemned to live in loneliness, excluded from one of civilization’s oldest institutions. They ask for equal dignity in the eyes of the law. The Constitution grants them that right."

Abortion

Kennedy's views on abortion have been complicated. He voted in favor of upholding Roe v. Wade despite his support for some restrictions such as parental notification and banning late-term abortions. In 1992, he voted in favor of abortion restrictions and switched to a plurality opinion, which means there is no clear majority. In his opinion, he wrote states could not impose restrictions that create an "undue burden" on expectant women.

"As with any medical procedure, the State may enact regulations to further the health or safety of a woman seeking an abortion, but may not impose unnecessary health regulations that present a substantial obstacle to a woman seeking an abortion."

He also voted against a 2016 Texas law that would have required abortion clinics have hospital admission privileges and rooms held to the same standard as ambulatory surgical centers. 

Capital Punishment

Kennedy voted against capital punishment for offenders who committed crimes when they were juveniles. 

"When a juvenile offender commits a heinous crime, the State can exact forfeiture of some of the most basic liberties, but the State cannot extinguish his life and his potential to attain a mature understanding of his own humanity."

Guantanamo Bay and Prisoner's Rights

In 2008, Kennedy voted prisoners at Guantanamo Bay have the right to challenge their detention in court before a judge. 

Kennedy cited the distribution of power between each branch of government in his opinion.

"Within the Constitution's separation-of-powers structure, few exercises of judicial power are as legitimate or as necessary as the responsibility to hear challenges to the authority of the Executive to imprison a person. Some of these petitioners have been in custody for six years with no definitive judicial determination as to the legality of their detention. Their access to the writ is a necessity to determine the lawfulness of their status, even if, in the end, they do not obtain the relief they seek."