Nicholas Cosmo, the former owner and president of two Hauppauge-based companies, was sentenced Friday to spend 25 years behind bars for stealing $195 million in a Ponzi scheme. Mr. Cosmo pleaded guilty in 2010 to mail fraud and wire fraud for taking money from more than 4,000 investors who thought they were funding short-term commercial loans.

Eastern District Judge Denis R. Hurley, sitting in Central Islip, ordered Mr. Cosmo, 40, to pay $179 million in restitution to his victims, many of whom lost their life savings as they were led to believe that short-term loans to small businesses would be made by Mr. Cosmo’s Agape World Inc., and Agape Merchant Advance. Instead, Mr. Cosmo admitted he used about $80 million to trade futures and commodities and paid false profits to early investors in the scheme.