The Supreme Court’s decision to bestow presidents with immunity from prosecution over official actions is an extraordinary expansion of executive power that will reverberate long after Donald J. Trump is gone.

Beyond its immediate implications for the election subversion case against Mr. Trump and the prospect that he may feel less constrained by law if he returns to power, the ruling also adds to the nearly relentless rise of presidential power since the mid-20th century.

It had seemed like a constitutional truism in recent years when more than one lower-court opinion addressing novel legal issues raised by Mr. Trump’s norm-breaking behavior observed that presidents are not kings. But suddenly, they do enjoy a kind of monarchical prerogative.

“The relationship between the president and the people he serves has shifted irrevocably,” Justice Sonia Sotomayor wrote in an outraged dissent joined by the court’s other two liberals. “In every use of official power, the president is now a king above the law.”

Dismissing those worries, Chief Justice John G. Roberts Jr., writing for the majority, argued that presidents stand apart from regular people, so protecting them from prosecution if they are accused of abusing their powers to commit official crimes is necessary.

“Unlike anyone else,” he wrote, “the president is a branch of government, and the Constitution vests in him sweeping powers and duties.”