NEW YORK (AP) — Bernard Madoff's former right-hand man, who once admitted he was loyal to his boss "to a terrible, terrible fault," has died less than a month before he faced sentencing for his role in the multi-billion dollar fraud.

Frank DiPascali, 58, died Thursday of lung cancer after spending his final years cooperating with investigators.

DiPascali had been due to appear on June 5 in federal court in Manhattan, where he was expected to get credit for pleading guilty and agreeing to become a key government witness against his former co-workers.

"He was grateful to have been able to make some amends by helping the government these past few years," his attorney, Marc Mukasey, said in a statement.

At his 2009 guily plea, DiPascali told a judge that account statements showing the firm was making trades for clients were "all fake," something "I knew, Bernie Madoff knew and other people knew."

About Madoff, he added: "I was loyal to him. I ended up being loyal to a terrible, terrible fault."

Testifying four years later at the trial of five former Madoff employees, DiPascali described to a jury how he found Madoff in tears as the Ponzi scheme was unraveling in late 2008.

"I'm at the end of my rope. I have no more money," DiPascali quoted Madoff as saying.

When he asked his boss what he meant, he said he snapped, "I don't have any more goddamned money! Don't you get it?"

The five defendants were convicted of charges they repeatedly lied to hide a fraud that enriched them and cheated investors — a renunciation of Madoff's claim when he pleaded guilty to fraud charges in March 2009 that he acted alone.

Madoff, 77, is serving a 150-year sentence at a federal lockup in North Carolina.