Eduardo Munoz Alvarez via Getty Images Former New York Assembly Speaker Sheldon Silver arrives to federal court in Lower Manhattan on May 3, 2016 in New York City.

NEW YORK, May 3 (Reuters) - Former New York State Assembly Speaker Sheldon Silver, for decades one of the state's most powerful politicians, was sentenced on Tuesday to 12 years in prison for collecting millions of dollars in illegal kickbacks.

U.S. District Judge Valerie Caproni said at a hearing in Manhattan federal court that she hoped the sentence would deter corruption among other politicians.

Silver, 72, had cast a shadow over whatever accomplishments he had as a lawmaker by participating in corruption, Caproni said. "Here's the thing about corruption: It makes the public very cynical," she said.

The judge also ordered Silver to pay a fine of $1.75 million and forfeit more than $5 million in ill-gotten gains.

The sentencing caps a stunning fall from power for Silver, a Democrat who represented Manhattan's Lower East Side and served as speaker of the state Assembly from 1994 to 2015.

Along with the state Senate majority leader and the governor, the Assembly speaker was one of the "three men in a room" who control virtually all major legislation in the state capital of Albany.

Silver's counterpart in the state Senate, the former majority leader Dean Skelos, was also found guilty of corruption just 10 days after a jury convicted Silver of seven counts in December.

Prosecutors said Silver awarded $500,000 in secret state grant money to a cancer researcher who, in exchange, funneled patients to Silver's law firm, allowing the lawmaker to collect millions of dollars in referral fees.

(Reporting by Joseph Ax; Additional reporting by David Ingram; Editing by Bernadette Baum and James Dalgleish)