The former outside accountant for Bernard Madoff's firm pleaded guilty to fraud charges on Tuesday, but he told a U.S. judge he did not know about the swindler's multibillion-dollar Ponzi scheme, which shook investor confidence and market regulators who missed it.

David Friehling, the former accountant and auditor who worked on Madoff's books for 17 years out of a small suburban New York firm from 1991, was allowed to remain free on bond of $2.5 million until he is sentenced next year.

At no time was I aware that Mr Madoff was engaged in a Ponzi scheme, Friehling told U.S. District Judge Alvin Hellerstein in Manhattan federal court during an hour-long plea proceeding. I never had contact with investors and never acted as a feeder to investors.

Madoff, 71, is serving a 150-year prison sentence after pleading guilty to the decades-long investment fraud of as much as $65 billion.

A Ponzi scheme is one in which early investors are paid with the money of new clients.

Madoff's fraud collapsed in the declining economy and the FBI arrested him last December.

Friehling, 49, is one of only three people who have been criminally charged so far in the case, considered the biggest investment fraud in Wall Street history. The others are Madoff himself and his longtime deputy Frank DiPascali, 53, who is jailed pending sentencing next year.

Friehling pleaded guilty to securities fraud, investment adviser fraud, making false statements to the U.S. Securities and Exchange Commission and breaking tax laws. Some of the charges carry a maximum penalty of 20 years imprisonment and millions of dollars in fines.

He told the court that he did not conduct any independent auditing or verification of financial statements or tax returns provided by Madoff and others at Bernard L. Madoff Investment Securities LLC in New York.

Friehling, who is cooperating with U.S. prosecutors, the FBI and the Internal Revenue Service in their investigation, did not identify any of the other people.

Friehling told the court that in what is surely the biggest mistake in my life, I placed my trust in Bernard Madoff. He apologized to the thousands of defrauded investors and to his wife of 27 years, their three children and other family members.

The SEC said in a statement that Friehling, who was part of the firm Friehling & Horowitz, agreed not to contest the regulator's charges against him. Jerome Horowitz, who died in March, was Friehling's father-in-law and had known Madoff since the early 1960s.

(Reporting by Grant McCool; Editing by Tim Dobbyn)