Sheldon Silver, the former New York Assembly speaker who brokered legislative deals for two decades before corruption charges abruptly ended his career, is begging for mercy as he faces sentencing for a second time.

The fate of Silver, 74, on Friday rests with a judge who ordered him imprisoned for 12 years after his first conviction in 2015.

That conviction was tossed out by an appeals court that said the Democrat's trial must conform with a recent Supreme Court ruling redefining the boundaries of corruption law.

Get Breaking News Delivered to Your Inbox

At a second trial this spring, a jury once again found him guilty of earning nearly $4 million illegally by collecting fees from a cancer researcher and real estate developers. Prosecutors say he invested those proceeds and collected another $1 million in illegal profits.

In a letter to U.S. District Judge Valerie Caproni, Silver begged for mercy.

"I pray I will not die in prison," Silver wrote, saying he was "broken-hearted" that he damaged the trust people have in government.

"The work that has been the focus of most of my life has become dirty and shameful," Silver said in his letter. "Everything I ever accomplished has become a joke and a spectacle. ... I beg for your mercy so that I can somehow go out into the world again to atone to everyone I have hurt."

Prosecutors told Caproni in a written submission that they had proved that Silver "repeatedly corrupted the great power of his office for personal profit and caused incalculable damage to the public trust."

Prosecutors say Silver should spend well over 10 years in prison. Defense attorneys argued for far less prison time and a community service component that would allow him to get out from behind bars.

First elected in 1976, Silver served as speaker for 21 years, resigning after his 2015 arrest. Known for his often inscrutable comments and wary, phlegmatic demeanor, Silver gained the nickname "the Sphinx."

The sentencing comes 10 days after Dean Skelos, the former New York Senate leader, and his son, Adam, were convicted of extortion, wire fraud and bribery at a retrial for each of them.

The once-powerful Republican and his son also were granted a new trial after the Supreme Court narrowed public corruption law as it reversed the conviction of former Virginia Gov. Bob McDonnell.

Silver and Skelos were among a trio dubbed the "three men in a room" in Albany, a nod to the longstanding practice of legislative leaders and the governor negotiating key bills behind closed doors. Skelos served in the Senate from 1985 to 2015 and became Senate leader in 2008.

Over 30 New York state lawmakers have left office under a cloud of criminal or ethical allegations since 2000. More than a dozen have been convicted of charges including authorizing bribes to get on a ballot, diverting money meant for community programs into a campaign and skimming funds from contributions to a Little League baseball program.