A businessman nicknamed a “mini-Madoff” because he was arrested only weeks after the billion-dollar swindler, pleaded guilty Friday to charges he orchestrated a $413 million Ponzi scheme that victimized thousands of investors.

Nicholas Cosmo, 39, pleaded guilty to mail and wire fraud in U.S. District Court on Long Island, N.Y., in a plea agreement with federal prosecutors. He faces up to 40 years in prison when he is sentenced in February.