NEW YORK — A son-in-law of former New York state Assembly Speaker Sheldon Silver was sentenced to two years in prison Wednesday after admitting cheating four investors out of nearly $6 million in a Ponzi scheme.

U.S. District Judge Vernon Broderick sentenced 37-year-old Marcello Trebitsch in Manhattan after telling Trebitsch he planned as recently as Monday to sentence him to four years in prison before rereading letters detailing his good deeds and value to his community. Trebitsch was also ordered to pay nearly $5.9 million in restitution.

Prosecutors said Trebitsch, who is married to Silver's daughter, solicited more than $8 million from four investors from 2007 to 2014 based on false and misleading representations.

The name of Silver, a Democrat convicted two weeks ago in the same courthouse in an unrelated corruption case, arose numerous times during a more than two-hour sentencing hearing.

Assistant U.S. Attorney Daniel Goldman said three of the four investors who lost money in Trebitsch's fraud had connections to Silver.

Defense attorney Benjamin Brafman depicted his client as a victim of investors who chose him because he was Silver's son-in-law. He said the biggest investor — the head of an investment fund in Maryland — chose to invest in the hopes that Silver would help arrange an investment with New York's public employee pension fund.

"All they wanted was for Sheldon Silver to get involved," Brafman said. He said the financier then hoped to get a verbal assurance from Silver that he would guarantee to cover any loss.

Goldman called it "astonishing" that Brafman would portray Trebitsch as a victim because of his family connection to Silver since he would have had no investors without that tie to Silver.

Federal sentencing guidelines recommended four to five years in prison, but Broderick said Trebitsch earned leniency with significant charitable acts including helping to bury the dead who cannot afford a proper burial.

Prosecutors said Trebitsch spent about $500,000 of the money invested with him on himself, his family and his community, while he squandered the rest through bad investments before trying to cover it up with fake financial statements.

Goldman said Trebitsch was "not a Madoff," a reference to the Ponzi king Bernard Madoff, serving a 150-year prison sentence after cheating thousands of people of about $20 billion.

"He never hit it big," Goldman said. "He spent more time making false account statements than he did investing."

Before he was sentenced, a tearful Trebitsch apologized, saying he was "really ashamed and embarrassed."

"I failed because of my stupidity and my idiocy," he said.