Beanies Babies founder Ty Warner was sentenced to two years of probation by a Chicago federal judge on Tuesday for hiding millions of dollars in a Swiss bank account as a way to avoid the payment of income taxes, Chicago Tribune reported.

Several dozen letters received in support of Warner and detailing his charitable works were read aloud by U.S. District Judge Charles Kocoras, while rejecting pleas for a prison sentence from prosecutors. Warner was also ordered to perform 500 hours of community service.

"Warner's private acts of kindness, benevolence and generosity are overwhelming," Kocoras said.

According to Chicago Tribune, Warner stood in court and apologized for his conduct before the sentence was imposed, saying the outpouring of support he has received has only intensified his "shame and embarrassment."

"Unfortunately, I never realized that the biggest mistake (I) ever made in my life would cost me the respect that was most important to me," Warner said. "For all if this, your honor, I am truly sorry."

The 69-year-old plead guilty to one count of tax evasion in October. Describing it as a "terrible mistake," he had requested for probation, Chicago Tribune reported.

Court records show that prosecutors had asked Kocoras to "give serious consideration" to sentencing guidelines that call for 46 to 57 months behind bars.

Despite Warner not getting jail time, prosecutors "held Mr. Warner accountable by bringing this case," U.S. Attorney Zachary Fardon told reporters after the hearing. "In addition to the record fine Warner has paid, he is a convicted felon and has had to endure the shame and hardship of a public prosecution."

 "It's not what we asked for," Fardon said in his first public comments about a case since he took office last fall. "But we have taken a position we think is fair and right under the circumstances, and that is the best that we can do."

Warner's attorney Gregory Scandaglia said in a statement that his client was humbled by the ruling, Chicago Tribune reported.

"The judge heard from many people who have benefited from Ty's quiet generosity over the years, and he crafted a sentence that allows Ty to continue to make amends in a way that most benefits society," Scandaglia said.

Undeclared Swiss bank accounts were maintained by Warner from 1996 to 2008, the government said. Apart from hiding the existence of the accounts, he failed to report $24 million in income in those accounts and pay taxes of about $5.6 million, prosecutors said.

Warner, a college dropout who founded Westmont-based Ty Inc., will be paying $53 million civil penalty and at least $16 million in back taxes, according to Chicago Tribune.