Arms crossed, scowl set, President-elect Donald Trump avoided jail, but became a felon.

Trump appeared virtually at his criminal sentencing on Friday from his Mar-a-Lago estate in Florida, more than 1,000 miles away from the chilly Manhattan courtroom where his case was called for a final time. Projected on a 60-inch screen, his image loomed over the gallery as a prosecutor recounted his crimes and a judge imposed his sentence.

Trump once faced up to four years in prison for falsifying business records to cover up a sex scandal, but on Friday, he received only a so-called unconditional discharge. The sentence, a rare and lenient alternative to jail or probation, reflected the practical and constitutional impossibility of jailing a president-elect.

It nonetheless carried symbolic significance, capping a yearslong ordeal that consumed Trump as a weary nation reckoned with the prospect of a criminal president. Once the sentencing concluded, it cemented his status as the first felon to occupy the Oval Office.

“Never before has this court been presented with such a unique and remarkable set of circumstances,” said the trial judge, Juan M. Merchan, who has felt the brunt of Trump’s rage over the case the past two years. “This has been a truly extraordinary case.”

It was also “a bit of a paradox,” he said, as the somber ritual of sentencing testified to both the supremacy and limits of presidential power.

The fact that the proceeding happened at all — despite Trump’s frenzied effort to shut it down — showed that the man preparing to reclaim the nation’s highest office was not entirely above the law. The machinery of New York’s justice system briefly brought him low, albeit in the comfort of his Florida mansion.

Yet nearly every detail of the highly scripted session demonstrated the singularity of the defendant: the months of delays, the virtual appearance and the largely consequence-free sentence. His critics were denied the catharsis of seeing a handcuffed former president heading to Rikers Island.

Explaining the lenience, Merchan acknowledged Trump’s inauguration 10 days hence, concluding that an unconditional discharge was the only way to avoid “encroaching on the highest office of the land.”

A conditional discharge would have required Trump to meet certain requirements, such as maintaining employment or paying restitution, but this sentence comes with no strings attached. No other defendant in Manhattan convicted of Trump’s crime has received an unconditional discharge in the past decade or so, court records show.

“It is the legal protections afforded to the office of the president of the United States that are extraordinary, not the occupant of the office,” said Merchan, who wore a gold tie and his standard judicial robe, adding that those protections were a “legal mandate” he had to respect.

It was Trump’s last courtroom tangle as a private citizen, a final showcase of the legal troubles that have dogged him since he left the White House.

The sentencing cleared the way for Trump to formally appeal his conviction, an effort that will coincide with the early part of his second presidential term.

The president-elect, seated alongside one of his lawyers in front of two towering American flags, was relatively subdued, occasionally glaring at the screen and shaking his head.

“This has been a very terrible experience,” Trump said during a six-minute speech. “The fact is, I’m totally innocent,” he added, describing the case as “an injustice of justice.”

The case arose from a 2016 hush-money payment to a porn star, Stormy Daniels, who was selling her story of a sexual encounter with Trump. Had she gone public, Daniels might have triggered a scandal in the final days of Trump’s presidential campaign.

Trump, the jury concluded, reimbursed his fixer, Michael D. Cohen, for the hush money and then directed that records be falsified to keep the payment under wraps.

Trump sought to play down the significance of the accusations, calling them a “pathetic” waste of taxpayer dollars. Still, he fought vigorously to block the sentencing. His lawyers pleaded with Merchan, raced to an appeals court and implored the Supreme Court to intervene.

The defendant’s argument hinged on his contention that he was, in fact, above the law. Trump, his lawyers argued, was entitled to immunity from criminal prosecution after he became president-elect. They cited a Supreme Court ruling last year granting presidents broad immunity for official acts.

None of it worked. Late Thursday, the Supreme Court refused to intervene.

For the Manhattan district attorney, Alvin L. Bragg, the prosecution was a career-defining endeavor. Bragg, who has said little about the trial in public since a post-conviction news conference, attended the sentencing but did not provide any comment.

But while it was Bragg who prosecuted Trump and Merchan who sentenced him, they did not convict him. Trump’s trial culminated in May with one of the nation’s oldest democratic traditions: a jury of his peers deciding his fate. Twelve New Yorkers voted guilty on all 34 counts.

On Friday, the judge said that regardless of Trump’s power and celebrity, “once the courtroom doors were closed, the trial itself was no more special, unique or extraordinary than the other 32 trials that took place in this courthouse at the same exact time.”

A prosecutor, Joshua Steinglass, recapped the “overwhelming evidence” introduced at trial, and said formalizing Trump’s felon status would respect the jury’s verdict.

Although the prosecution had recommended the unconditional discharge, Steinglass still blasted Trump. “Far from expressing any kind of remorse for his criminal conduct, the defendant has purposefully bred disdain for our institutions and the rule of law,” Steinglass said.

Trump, he added, “has caused enduring damage to public perception of the criminal justice system and has placed officers of the court in harm’s way” — a nod to his relentless attacks on prosecutors and judges.

The rebuke represented a sharp contrast from Trump’s experience at all-sun, all-the-time Mar-a-Lago, where he has basked since his election triumph, with a parade of supporters lined up to curry favor.

And it was a remarkable exception to his lucky legal fortunes. One year ago, he faced 91 felony counts across four criminal cases. Now, two of those cases are gone, and one is in disarray.

The federal special counsel who brought two of the cases shut down both after the election, bowing to a long-standing Justice Department policy prohibiting prosecutions of sitting presidents.