Supreme Court Justice Anthony Kennedy says he will retire from the nation's high court next month, giving conservatives an unanticipated opportunity to remake the nine-member body in their ideological image.

It sets up a culture wars clash in the Senate where the new nominee's views on abortion and gay marriage, as well as the role of the state, are set to be at the center of fierce party battles.

At 81, Kennedy retires as the second-oldest justice on the judicial panel his swing votes have become a fixture on. He will retire on July 31 just after his birthday next month.

For Donald Trump, the retirement provides the Republican president with the right to leave his stamp on the judicial branch for decades to come, as whoever he decides to appoint is likely to be approved by the narrowly-held GOP Senate.

Already, he has put one judge on the court, Neil Gorsuch, 49 when he was nominated.

Hailing Kennedy, Trump said today in the Oval Office that he is 'a man I have great respect for' and who has displayed 'tremendous heart.'

'He's been a great justice of the Supreme Court,' Trump declared after an afternoon meeting with him. 'He is a man who has displayed great vision.'

Supreme Court Justice Anthony Kennedy said on Wednesday he plans to retire after three decades as a pivotal vote on the highest U.S. judicial body, giving President Donald Trump an opportunity to make the court more firmly conservative

Judge Anthony Kennedy is given the constitutional oath by Chief Justice William Rehnquist during a White House ceremony. Kennedy's wife Mary holds a Bible as then-President Reagan (R) looks on

Justices of the U.S. Supreme Court gather for an official group portrait to include new Associate Justice Neil Gorsuch, top row, far right at the Supreme Court Building in Washington. Gorsuch was Trump's first Supreme Court justice. Now he gets another one

Kennedy joined the court in 1988 during the tenure of Republican President Ronald Reagan. He cast swing votes in cases on gay rights, abortion, and most recently, the Trump administration's travel ban.

His retirement will firmly establish the judicial panel as a conservative one based on Trump's already-published list of legal minds from which he will make another appointment.

One evangelical leader, Bob Vander Plaats, told Fox News: 'We have a chance to take down Roe v. Wade. This is a historic moment in the pro-life community today.'

He suggested that gay marriage could be overturned too, saying: 'I think God's design is for marriage and family. We will revert back to that.'

It was too early to say on Wednesday who from the list of 25 might be the White House's front-runner.

With the mid-term elections just around the corner, the Trump administration has a limited amount of time to vet a replacement and get him or her approved the slow-paced U.S. Senate.

Having already canceled lawmakers' summer break to consider the president's other lingering nominations, Senate Majority Leader Mitch McConnell improved Trump's odds. McConnell pledged Wednesday to get the job done by this fall.

But Chuck Schumer, the Democratic minority leader, said there should be no vote in an election year - saying that the Republican refusal to consider President Obama's nominee when Antonin Scalia died because it was a presidential election year sets a precedent.

The Senate has the sole authority to approve the president's nominations. Republicans lowered the threshold for court appointments last year to a simple majority in order to push through Trump's first high-court pick, Neil Gorsuch.

The GOP is currently anticipated to expand its 51-seat majority in the U.S. Senate in November. Waiting until after the election to appoint a justice could, however, prove disastrous if any of the seats the GOP currently holds fall into the other party's palm.

The president said today that will begin searching for a replacement 'immediately,' saying, 'I think you want to go as quickly as possible.'

Trump touched on the importance of his choice to replace Kennedy in an Oval Office meeting on Wednesday afternoon with the Portuguese president that coincidentally began just after Kennedy's retirement went public.

'I think we can all say one of the most important events, one of the most important things for our country,' he said of president's decision to pick a new high-court justice. 'It's always been considered a tremendously important thing.'

The Republican president who appealed to conservatives in the election by promising to appoint conservative judges said he will pick a replacement for Kennedy who will 'hopefully be as outstanding' as the 30-year Supreme Court judge.

'I know that he will be around, hopefully, for a long time to advise,' he said of the 81-year-old judge.

Trump said that he met with Kennedy for a half-hour earlier today. He indicated that the retirement announcement came minutes after Kennedy slipped in and out of the White House undetected.

The president said the retiring justice will be 'teaching and doing a lot of things' once he leaves the court.

An official White House statement thanked Kennedy for his more his life of public service, noting that he authored landmark opinions in almost every case since he took the bench that dealing with constitutional law.

'Today, we thank Justice Anthony M. Kennedy for his thirty years of distinguished service on the Supreme Court of the United States. In 1987, President Reagan nominated him to the Court, and he was swiftly confirmed without opposition,' the statements read.

'A Californian—like the President who appointed him—Justice Kennedy is a true man of letters. During his tenure on the Court, he authored landmark opinions in every significant area of constitutional law, most notably on equal protection under the law, the separation of powers, and the First Amendment’s guarantees of freedom of speech and religion.'

The White House described Kennedy as a 'tireless voice for individual rights and the Founders’ enduring vision of limited government' in the statement officially announcing his exit.

'His words have left an indelible mark not only on this generation,' the statement said, 'but on the fabric of American history.'

Kennedy was confirmed by a unanimous Senate vote during Ronald Reagan's final year in office and was known as a 'swing vote,' arbitrating 5-4 decisions that pitted conservative justices against liberal ones.

Asked in 2015 if he relished the power that came with that role, he demurred: 'I think that's overrated.'

He had plenty of spotlight moments that made Republicans wonder whether Reagan had chosen wisely.

Just four years after joining the Court, Kennedy co-authored a decision in 'Planned Parenthood v. Casey,' which upheld the 'Roe v. Wade' decision legalizing abortion.

But in 2007 he swung in the other direction, voting with conservatives in a 5-4 split on 'Gonzales v. Carhart,' upholding a nationwide ban on partial-birth abortions.

In George W. Bush's last year as president, Kennedy wrote a 5-4 majority opinion declaring that the U.S. Constitution guaranteed 'habeas corpus' rights to inmates at the Guantanamo Bay military prison.

During President Barack Obama's second term in office, Kennedy's judgment trended further to the left.

He wrote the 2012 majority opinion in 'Arizona v. United States,' which overturned three sections of Arizona's controversial 2010 immigration law.

One provision that the Supreme Court axed had authorized warrantless arrests of illegal immigrants whom state officials thought were eligible for deportation.

A year later he wrote a majority opinion striking down part of the Defense of Marriage Act.

In 'United States v. Windsor,' a 5-4 vote established that DOMA, which defines a marriage as a 'legal union between one man and one woman,' denied same-sex couples their Fifth Amendment rights to equal protection under federal law.

In 2015 Kennedy struck the final blow for same-sex marriage, again serving as a swing vote in a 5-4 decision.

In 'Obergefell v. Hodges,' he wrote the opinion making it legal in all 50 states for gays and lesbians to marry.

Researchers at SCOTUSblog have documented how Kennedy's swing-vote status helped the conservative wing of the Court during his early years, a state of affairs that changed as he swung to the left more recently.

Between 2010 and 2014, America's highest court issued 57 decisions that hung on razor-thin 5-4 margins

Of those, Kennedy sided with conservatives 37 and liberals 20 times.

But from 2015 to 2017, there were 23 different close-shave decisions; Kennedy pleased the left in 15 of those cases, and voted with the right only 8 times.

Trump told reporters Wednesday he'd be picking a replacement for Kennedy from an group of conservative legal scholars and judges the White House had previously made public.

'We have obviously, a number of people, 25 people,' he said. 'I think you see the kind of quality that we're looking at when you see that list.'

The president indicated that he had not had time to think too much more about the topic.

Senate Minority Leader Chuck Schumer said Wednesday shortly after the announcement on the Senate floor that Democrats would fight any attempt to confirm a nominee 'who will put health insurance companies over patients, or put the federal government between a woman and her doctor.'

He made special reference to the risk of overturning the abortion case 'Roe v. Wade.'

Schumer objected to the list of 25 potential high court nominees from which the president has said he will choose his second pick in fewer than two years.

'Americans should make it clear that they will not tolerate a nominee chosen from President Trump's pre-ordained list, selected by powerful special interests who would reverse the progress we've made over the decades,' he stated.

McConnell, the Senate Republican who presides over a tight 51-vote majority, indicated he's ready to move ahead no matter who Trump chooses.

'The Senate stands ready to fulfill its constitutional role by offering advice and consent on President Trump’s nominee to fill this vacancy. We will vote to confirm Justice Kennedy’s successor this fall,' he said.

'Judicial decisions must not flow from judges’ personal philosophies or ‎preferences, but from the honest assessment of the words and actual meaning of the law,' McConnell added, foreshadowing the measuring-stick GOP senators will apply.