The former president of a defunct Long Island-based national mortgage lender was sentenced in federal court in Central Islip to 3 years of probation and ordered to pay $20 million in restitution to taxpayers.

Michael Primeau, who was president of Lend America in Melville until its 2009 collapse, was sentenced Friday. He pleaded guilty to bank fraud in 2011.

He had faced up to about 6 1⁄2 to 8 years in prison. In a letter to Judge Joseph Bianco in July, prosecutors wrote that Primeau had provided “substantial assistance” in the case and called him a mere “figurehead” at the company.

His attorney, John F. Carman of Garden City, said Primeau is “deeply grateful” for the “eminently fair” sentence. Primeau now lives in San Antonio, Carman said.

Primeau was ordered to pay restitution to the Government National Mortgage Association, or Ginnie Mae, the federal agency that guaranteed loans made by Lend America. Taxpayers lost $49.3 million when Lend America failed, prosecutors wrote.

It is unlikely that he will be able to pay the full amount of restitution, Carman said. Primeau also was ordered to forfeit his $121,565.68 retirement account.

Until Lend America went out of business, the company did $1 billion in mortgage business a year, mostly refinancings, court papers show.

Get the Biz Briefing newsletter!

Primeau and others “knowingly and intentionally withheld closing funds that should have been used to pay off” borrowers’ previous mortgages, and used the funds to pay Lend America’s operating costs, prosecutors wrote in July.

The company, which had once employed 600 people, shut down after the U.S. attorney sued in late 2009, charging it with making fraudulent, taxpayer-backed loans.