By replacing the retiring Justice Anthony M. Kennedy, right, President Trump has a chance to cement his legacy by adding another solidly conservative justice to the Supreme Court alongside his first choice, Neil M. Gorsuch, center.

WASHINGTON — President Trump’s time in office has been tumultuous, his term dogged by the special counsel investigation, his major legislative achievements few and his political prospects clouded by the chances of a Democratic Party midterm wave.

But no matter what else happens in the Trump presidency, the retirement of Justice Anthony M. Kennedy, the Supreme Court’s swing voter, set up Mr. Trump to cement a lasting legacy. Given a second Supreme Court vacancy to fill, he appears likely to go down in American history as an unusually influential president.

As the first Republican president to get his judicial nominees confirmed by a simple majority vote, thanks to the abolition of the Senate filibuster rule, Mr. Trump has already broken records in appointing young and highly conservative appellate judges. Now, Mr. Trump can create a new majority bloc on the Supreme Court — one that is far more consistently conservative, and one that can impose its influence over American life long after his presidency ends on issues as diverse as the environment and labor or abortion and civil rights.

If Mr. Trump secures that prospect, he will fulfill the deal that he struck during the 2016 campaign with traditional and movement conservatives who were skeptical of his politics and hesitant about supporting his candidacy. They feared he would pick an idiosyncratic nominee, like a celebrity lawyer he saw on television, rather than an authentic conservative.

But Mr. Trump shored up Republican turnout in the election by promising to select Supreme Court nominations from a list of conservative judges. It was shaped by his top legal adviser, Donald F. McGahn II, now the White House counsel, who worked with advisers like Leonard Leo, the executive director of the Federalist Society, the conservative legal movement network. Court-focused voters helped deliver Mr. Trump’s narrow victory over Hillary Clinton, exit polls showed.

Mr. Trump picked from his list to fulfill his first vacancy last year, choosing Neil M. Gorsuch to replace Justice Antonin Scalia, a staunch conservative. Since then, debates among conservatives about his unruly presidency have been characterized by a joking shorthand for what traditional Republicans got in return: “But Gorsuch.” In November, the White House quietly issued a revised version of the list in case another vacancy arose.

It is filled with young and conservative appeals court judges — including runners-up from the last…