A recent ruling by the U.S. Supreme Court has granted former President Donald Trump broad immunity from criminal prosecution, potentially shielding him from life imprisonment and solidifying his influence over the nation’s highest court for years to come. The decision, issued in July, asserts that a former president cannot be prosecuted for official actions taken while in office, although they can still face legal consequences for actions outside the scope of their presidential duties.

Trump, who is set to return to the White House as President-elect, has already reshaped the Supreme Court during his first term by appointing three conservative justices. These appointments, along with the possibility of more in his second term, may ensure a lasting conservative majority on the court for decades. Two of the court’s most conservative justices, Clarence Thomas and Samuel Alito, who are both in their 70s, could consider stepping down in the coming years, knowing their replacements would likely be nominated by Trump.

“It certainly presents an opportunity for them to retire with confidence that their successor would continue their judicial philosophy,” said Christopher Peters, a law professor at the University of Akron. “And I wouldn’t be surprised if that happens,” he added. Legal experts, including Steven Schwinn from the University of Illinois Chicago, suggest that Thomas and Alito could retire quickly, particularly before the 2026 midterm elections, when Republicans could lose Senate control.

Although Supreme Court justices are appointed for life, they must be confirmed by the Senate, and Trump’s potential second term could give him the chance to appoint more justices, further solidifying a conservative grip on the court.

Trump, who has become the first former U.S. president to be convicted of a crime—related to falsifying business records to cover up a hush-money payment—has been emboldened by the court’s immunity ruling. The decision comes at a critical time as he faces charges from Special Counsel Jack Smith for allegedly attempting to overturn the results of the 2020 presidential election. However, a trial has been delayed after appeals, ultimately bringing the case to the Supreme Court, where conservatives hold a 6-3 majority.

In an opinion written by Chief Justice John Roberts, the court ruled that while a former president has broad immunity from prosecution for official actions taken while in office, they are still subject to legal action for unofficial acts. This ruling has major implications for Trump’s ongoing legal battles, including the investigation into his efforts to interfere with the 2020 election.

The ruling, according to Schwinn, “not only allows, but actively encourages a president to engage in illegal behavior, providing a sort of roadmap for doing so while shielding themselves from accountability.” He added, “The real question is whether a president will abuse that power—and for my money, a President Trump seems more likely to do so.”

Justice Sonia Sotomayor, one of the court’s three liberal justices, delivered a sharp dissent, warning that the ruling effectively places the president “above the law” and grants them king-like immunity.

While Trump has faced setbacks in the past, including initial Supreme Court rulings blocking his Muslim travel ban and protecting the Deferred Action for Childhood Arrivals (DACA) program, the current court makeup means that the judiciary may now be the final barrier between Trump and his ambitions. Georgetown University law professor Steve Vladeck argued in a New York Times essay that with Republicans controlling both houses of Congress, the Supreme Court could become the last institution standing between Trump and his desires. However, Vladeck also pointed out that the court’s own approval ratings have plummeted, and the justices are facing growing scrutiny over ethical concerns, particularly regarding lavish vacations funded by powerful conservative donors.

“If Trump simply ignores a decision by the court that he doesn’t like, what happens then?” Vladeck asked. “What will happen if he tells the justices to ‘pound sand’?”