ALBANY, N.Y. (AP) — The former head of payroll company pleaded guilty Wednesday to federal charges related to a scheme that caused more than $100 million in losses to banks and businesses and left thousands of workers at small businesses without paychecks.

Former ValueWise CEO Michael Mann faces from 17 years to 32 years in federal prison and will have to pay $101 million in restitution.

Mann admitted in federal court in Albany that from 2013 to September 2019, he engaged in a fraudulent scheme to deceive banks and financing companies into loaning his companies tens of millions of dollars. Because Mann couldn’t repay the loans with legitimate business revenues, he diverted millions entrusted to his payroll companies, according to federal prosecutors. The subsidiary companies included Albany-area-based MyPayrollHR.

The scheme collapsed in September after one of his banks froze his accounts, eventually leaving his companies suddenly unable to make payroll for hundreds of small business customers nationwide, prosecutors said.

“Michael Mann’s fraud was staggering,” U.S. Attorney Grant C. Jaquith said in a prepared statement. “He caused more than $100 million in losses and wove a web of deception so complex that it eventually ensnared hundreds of small businesses and several thousand workers across the country.”

Mann, 50, pleaded guilty to conspiracy to commit wire fraud, aggravated identity theft, nine counts of bank fraud and filing a false tax return.

He is the second person to plead guilty in connection with the scheme. He is scheduled to be sentenced on Dec. 10.