Sheldon Silver, the disgraced ex-speaker of the New York state Assembly, was sentenced to seven years in prison — less than the 12 years he was sentenced to previously.

The judge cited the 74-year-old Silver’s advanced age and the substantial monetary penalties she plans to levy, including a $1.75 million fine, in the lower sentence.

Silver was convicted in May — for a second time — of selling his office for $4 million in kickbacks, plus $1 million in profits, tied to two schemes.

Before his arrest in 2015, Silver was one of the most powerful men in Albany — along with Gov. Andrew Cuomo and former Senate Majority Leader Dean Skelos.

At his 2016 sentencing, Judge Valerie Caproni — who sentenced him again this time around — ordered him to serve 12 years in prison and to forfeit nearly $5.2 in ill-gotten gains and another $1.75 million in fines.

But Silver never served a day in prison because his 2015 conviction was overturned on appeal amid questions about the validity of the jury instructions, which were raised after the US Supreme Court narrowed the definition of bribery.

Silver’s lawyer Michael Feldberg has said he plans to appeal the second verdict as well, saying the feds once again failed to prove that Silver promised anything in return for the lucrative referrals he received.

The Lower East Side Democrat is the fourth public official with ties to Albany to be convicted in the Manhattan federal courthouse since March.

Others include ex-Cuomo aide Joe Percoco, Skelos, and Alain Kaloyeros, Cuomo’s point man for his “Buffalo Billion” program to revitalize upstate New York.

During Friday’s sentencing, Caproni blasted Albany’s culture of corruption, noting that recent months have all “touched, directly and indirectly, the ‘three men in a room'” — the derisive term used to describe the governor and top leaders of the Senate and Assembly.

“This has to stop,” she said. “New York state has to get its act together and do something institutionally to stop corruption.”

Still, she commended Silver for apologizing for his conduct this time around, which he did not do in 2016.

“That was a wise decision on Mr. Silver’s part,” she said. “Mr. Silver’s conduct clearly caused discernible harm.”

She also remarked on signs of wear and tear.

“I feel like visually he’s aged more than the three years that have gone by chronologically,” she said.

Silver also spoke at the sentencing, saying that he is “extremely, extremely remorseful” for having “brought out a great deal of distrust in NY’s government.”

“I fear that I will continue to be ridiculed and disdained,” he said.