James Lewis Jr., the operator of one of the largest Ponzi schemes in U.S. history was sentenced to 30 years in prison last week. That was the maximum sentence that could be imposed. He was also ordered to pay $156 million in restitution.

The sentence comes after a guilty plea to one count of money laundering and one count of mail fraud. 12 charges were dropped in exchange for the guilty pleas on these two counts.

The Ponzi scheme lasted for almost 20 years, and took in $311 million. Lewis represented to investors that he was earnings returns of 18% to 40% by investing in leased medical equipment, financing medical insurance, making commercial loans, and buying and selling troubled businesses.

In reality, Lewis was using money from new investors to pay of old investors, the classic Ponzi scheme. Some investors received money back from the scam, leaving a loss of $156 million for the later investors.