[Latest: Sheldon Silver’s corruption conviction is partially overturned, but prison is still likely.]

Sheldon Silver, the former speaker of the State Assembly who rose to become one of New York’s most powerful politicians, was sentenced to seven years in prison on Friday for his conviction on federal corruption charges.

Mr. Silver, a Democrat from Manhattan’s Lower East Side, had served as speaker for more than two decades, and influenced nearly every major aspect of state politics. He was convicted in May after an earlier conviction, in 2015, was overturned on appeal.

“This crime was driven by unmitigated greed,” the judge, Valerie E. Caproni of Federal District Court in Manhattan, said before she announced the sentence, referring to one of Mr. Silver’s two corrupt schemes.