Philadelphia's former Democratic district attorney Seth Williams was sentenced Tuesday to 60 months in prison for accepting a bribe during his corrupt tenure.

U.S. District Judge Paul Diamond said Willaims sold his Philadelphia office to "parasites," the Associated Press reports. Diamond ordered Williams to be imprisoned immediately.

"Your profound dishonesty has to be deterred," Diamond said.

Williams was charged with accepting cash and gifts, using thousands from his campaign fund for personal expenses, misuse of city vehicles, and defrauding his mother's nursing home. The investigation took nearly two years to complete.

The trial included testimony that Williams accepted gifts such as a Caribbean vacation and a Jaguar convertible, which led to him pleading guilty to one of the charges.

He had been charged with 29 counts of bribery, extortion, and fraud, all of which prosecutors maintained he committed. However, the other 28 counts were dismissed.

In a press release, the Department of Justice announced: "Today's sentence is a fitting punishment for an elected official who put his financial interests above his constituents and the dedicated public servants of the District Attorney’s Office."

"With today’s sentencing, Seth Williams has officially been brought to justice. But the damage he's done to the public trust is much harder to resolve," said Michael Harpster, Special Agent in Charge of the FBI's Philadelphia Division.

Diamond also sentenced Williams to three years of supervised release, on top of his 60-month prison term. Diamond also ordered Williams to pay a forfeiture of $33,009 and restitution of $58,422.83.