An accountant who worked for Bernard Madoff (MAY'-dawf) before cooperating in the investigation of Madoff's massive Ponzi scheme has been sentenced to a year of home detention.

David Friehling (FREE'-ling) apologized on Thursday before hearing his sentence.

Friehling began cooperating before prosecutors charged him with certifying Madoff's fabricated financial records.

He pleaded guilty and testified last year at a trial where five of the firm's insiders were convicted of aiding one of the largest frauds in U.S. history.

Prosecutors told the judge on Thursday that Friehling deserved credit for his cooperation.