If the ethics fines, the personal scandals, the bribery trial, and his abrupt resignation in disgrace this summer were not enough, the public dressing down that Seth Williams received from the federal judge who sentenced him Tuesday to five years in prison surely cemented 2017 as the worst year of the former Philadelphia district attorney's life.

U.S. District Judge Paul S. Diamond held little back as he lit into the city's fallen top prosecutor, giving him the harshest punishment allowable by law, and calling him a "criminal" who "fed his face at the trough" of public money.

Williams humiliated his employees, the judge continued, and dumped his own mother "like a sack of potatoes" by stealing money set aside to cover her nursing home care to project a "high-roller" image to the "parasites [with whom he] surrounded" himself.

And when it came to Williams' request Tuesday to be temporarily released from custody before the start of his prison term to see his dying mother one last time, Diamond simply scoffed.

"The English language doesn't have the words to capture the outrageousness of that request," the judge said, eliciting gasps from the courtroom gallery. "The defendant stole from his mother, and now he wants to visit her?"

With that final kiss-off, Williams – once hailed as a long-awaited reformer to the city's criminal justice system – was hauled out of court in handcuffs, his shoulders slumped, his face the very picture of defeat.

Earlier in the hearing, Williams, too, had joined in the attempts to debase himself before the court, listing the litany of all he had lost as he expressed his remorse to the judge.

"Rather than holding myself to a higher standard, I squandered the trust placed in me," he said in a statement read by his lawyer to the court. "I lost my job, reputation, pension, house, law license, and liberty."

His lawyer, Thomas Burke, said Williams would be "virtually penniless" by the time he was released from prison.

But even those attempts drew Diamond's ire. He upbraided the ex-prosecutor for not delivering the speech himself, saying Williams' apologies lacked credibility and sounded like reworked campaign speeches.

"Almost from the time you took office, you sold yourself to the parasites you surrounded yourself with," Diamond said. "You humiliated the men and women of the District Attorney's Office."

Tuesday's hearing provided only the latest setback for Williams, whose public life in the last year has been marked by one embarrassing blow after another, most of them self-inflicted.

Earlier this year, his failure to report more than $175,000 in gifts from wealthy benefactors prompted the city's Ethics Board to fine him $62,000, the largest penalty against a political officeholder in the body's 11-year history. Williams dropped his bid for a third term soon after, apologizing to his staff for the shame he brought upon his office.

The federal bribery and corruption case that led to his sentencing Tuesday followed soon after. Prosecutors painted Williams as a crooked politician who took every opportunity to enrich himself through fraud, theft from his campaign fund, and bribes accepted from generous donors.

Two wealthy businessmen testified that they had showered Williams with gifts of cash, luxury goods, and all-expenses-paid travel to an upscale Dominican Republic resort and other vacation spots, hoping he would repay their generosity by using his office to remove various legal hurdles.

Williams' decision two weeks into his trial to end a barrage of embarrassing evidence — such as text messages he sent to his benefactors describing himself as "merely a humble beggar" — by reversing course and pleading guilty only worsened his situation. Diamond decided to throw him in jail immediately to await his sentence, an unusual move in white-collar cases.

Burke, after Tuesday's hearing, said he and Williams were not surprised by Diamond's harsh rebuke and had girded themselves for the worst. He remained hopeful that his client soon would be assigned to a less restrictive environment to serve out his prison term.

Since his guilty plea, Williams has been confined to an 8-by-10 cell in the Philadelphia Federal Detention Center's Special Housing Unit, a safety precaution because of his role as a former law enforcement official. There he has spent 23 hours a day, only allowed outside for an hour of exercise. Guards have permitted him one visitor a week and one 15-minute phone call a month, per the unit's protocol.

"I am not here to pretend Seth is a perfect man," he said. "But Seth is a good man — a family man, a man devoted to his community. Unfortunately, Seth is also a flawed man, and his flaws led him to make flawed decisions."

The prosecutors who tried the case – Robert Zauzmer, Vineet Gauri, and Eric Moran – said Williams got what he deserved.

"The message is unmistakable," Zauzmer said while leaving the courthouse Tuesday. "Federal prosecutors and law enforcement agents take this very seriously. We will always be here … and we will always address these crimes."