Supreme Court Associate Justice Anthony Kennedy has announced he will retire. He notified President Trump in a letter Wednesday.

In the letter, he told Mr. Trump that effective July 31, he would end "regular active status as an Associate Justice of the Supreme Court, while continuing to serve in a senior status."

Kennedy called it the "highest of honors to serve on this Court," and he expressed his "profound gratitude for having had the privilege to seek in each case how best to know, interpret, and defend the Constitution and the laws that must always conform to its mandates and promises."

President Trump said that he found out about Kennedy's retirement a half-hour before it was announced -- he had in fact gone to the White House to talk to the president for about 30 minutes, and Kennedy offered recommendations about who might replace him, the president told reporters during a meeting with the president of Portugal. Mr. Trump did not answer questions about who Kennedy recommended.

Get Breaking News Delivered to Your Inbox

He called Kennedy a "spectacular man" with "tremendous heart" and said he hoped to pick somebody who will be as "outstanding" as Kennedy has been. The search, the president said, will begin immediately, and Kennedy's replacement will be chosen from the list of 25 candidates he considered last year, when he ultimately chose Gorsuch.

Here is the letter he sent to President Trump:

CBS News' Jan Crawford noted that Kennedy had been saying privately he would retire, so this was not a big surprise. Kennedy's retirement gives Mr. Trump his second nomination, following Justice Neil Gorsuch. With this next nomination, he could turn the Supreme Court to the right for a generation, she said on CBSN.

Kennedy was nominated in 1987 by President Reagan to the court, after Robert Bork's nomination failed and Douglas Ginsburg was pressured to withdraw after questions were raised about his admission he had smoked marijuana several times.

Though he was nominated by a Republican president, Kennedy, a California native, also has a strong libertarian streak, and he was the swing vote on the court, casting the deciding vote on the same-sex marriage decision, affirmative action, and Citizens United, among others. Crawford points out that he refused to overturn Roe v. Wade, and he also constrained the bolder conservatives on the court, pulling them back a little bit. "He would just never say 'never' on those social issues," Crawford said.

Crawford expects the president to name a new justice soon, to be confirmed during the summer and in place when the high court returns in October to hear arguments.

His retirement is a tremendous blow to the Left, especially after Senate Democrats' failure to filibuster the president's first Supreme Court nominee, Neil Gorsuch. Sen. Majority Leader Mitch McConnell invoked the nuclear option, lowering the threshold from the super majority of 60 votes that is normally required for confirmation to a simple majority. That simple-majority rule remains in place for subsequent nominees.

CBS News' Chief White House correspondent Major Garrett points out that Kennedy's retirement is a campaign gift to Republicans and the president. The second Trump Supreme Court nominee will be galvanizing call to Republicans to support Republicans on the ballot in Senate and House races in the midterms.