Philadelphia District Attorney Seth Williams leaves the James A. Byrne Federal Courthouse after the second day of his corruption trial.

Former Philadelphia District Attorney Seth Williams is scheduled to be sentenced Tuesday in federal court for taking bribes.

The scandal that ultimately consumed Williams, 50, broke last year when it was revealed that he failed to list tens of thousands of dollars’ worth of gifts in required financial disclosures for public officials. Things got worse for Williams when he was indicted, leading to a full-blown corruption case in which Williams ultimately pleaded guilty in the middle of trial.

Now Williams’ fate is in the hands of U.S. District Judge Paul S. Diamond of the Eastern District of Pennsylvania, who has so far shown little sympathy for the disgraced ex-DA by denying bail and ordering Williams to be taken into custody immediately after his guilty plea. Williams has been in jail since late June.

For his crimes, the maximum sentence allowable under the federal guidelines is five years.

After his resignation, guilty plea, and incarceration, Williams suffered another blow Oct. 19 in the form of his disbarment by the state Supreme Court, retroactive to April 13, when his law license was suspended.

Williams’ guilty plea came as part of a deal with the government, with prosecutors agreeing to dismiss 28 of the 29 charges against him in exchange for admitting to one count—that he took bribes, including a trip to a luxury resort in Punta Cana, from Feasterville businessman Mohammad N. Ali in exchange for helping Ali bypass airport security.

For two weeks, the prosecution portrayed Williams to the jury as a cash-strapped, corrupt politician willing to sell his power and influence for anything he could get his hands on. They showed the jury volumes of evidence including incriminating text messages between Williams and his associates; reams of financial documents detailing his inability to manage money; and perhaps most damaging, testimony from Ali, who told jurors that he cozied up to Williams in 2010 so he could gain a powerful friend.

Despite pleading guilty to a single charge, Williams still admitted to committing all the crimes he was accused of, including taking bribes from Michael Weiss, owner of Philadelphia gay bar Woody’s, in exchange for official favors, stealing $23,000 meant for his mother’s nursing home care, misspending campaign money on expensive dinners and parties, and taking government vehicles for personal use.

After delivering his guilty plea, an emotional Williams tried to convince Diamond that he was not a flight risk and should be released on bail. He said he had only $200 to his name and no way to get around except for a few old bicycles.

Diamond, however, was not moved. He rejected Williams’ bail request and ordered that he immediately be taken into custody, telling the embattled district attorney’s lawyers he didn’t trust Williams’ assurances that he would not flee, citing evidence of Williams’ dishonesty presented by prosecutors.

“I have here a guilty plea from the highest law enforcement officer in the city,” Diamond said, who called out the district attorney for violating his oath to serve the public. “I am appalled by the evidence I have heard.”

Williams served as the city’s inspector general from 2005 to 2008. He was elected district attorney in 2009 and re-elected in 2013.