Mr DiPascali said he knew what he had done was wrong
Frank DiPascali, the former chief financial officer of Bernard Madoff, has pleaded guilty for his role in his boss's $65bn (£40bn) fraud.
Mr DiPascali, who admitted all 10 of the fraud charges he faced, apologised to the court in Manhattan. He said he knew what he had done was "wrong".
The 52-year-old, who worked for Madoff for 33 years, added that he had followed his boss too loyally.
Madoff, 71, was jailed for 150 years at the end of June.
Last month he decided not to appeal against his sentence.
Mr DiPascali told the court that all the transactions of Madoff's business were "fake".
WHAT IS A PONZI SCHEME?
A fraudulent investment scheme paying investors from money paid in by other investors rather than real profits
Named after Charles Ponzi who notoriously used the technique in the United States in the 1920s
Differs from pyramid selling in that individuals all tend to invest with the same person
"It was all fictitious. It was wrong, and I knew it was wrong at the time," he said.
Mr DiPascali added that he had helped Madoff "and other people carry out a fraud", but did not name the other individuals.
He also told the court that "under Bernie Madoff's direction" he lied to the US financial watchdog, the Securities and Exchange Commission, about the activities of the company, Bernard Madoff Investment Securities.
At the end of the court hearing, District Judge Richard Sullivan ordered Mr DiPascali to be jailed ahead of sentencing, but said he may reconsider this decision in the future.
Prosecutors had asked for Mr DiPascali to be kept free or under house arrest so he could help them with their continuing investigations.
The 10 charges Mr DiPascali pleaded guilty to included conspiracy, securities fraud, money laundering and perjury.
He faces a jail sentence of up to 20 years, and a fine of up to $500,000 (£303,000).
Mr DiPascali is the third person to be charged in connection with the fraud at Madoff's investment business, following Madoff himself and the company's external accountant, David Friehling.
Madoff said he had been running the Ponzi scheme since the early 1990s
Mr Friehling is currently free on bail after being charged in March with aiding and abetting fraud, and four counts of filing false audit reports. He has pleaded not guilty.
Madoff admitted defrauding thousands of investors through a Ponzi scheme which he said had been running since the early 1990s.
A Ponzi fraud works by paying investors from money paid in by other investors rather than real profits.
It differs from pyramid selling in that individuals all tend to invest with the same person.
High profile victims
Madoff's firm was investigated eight times by the US Securities and Exchange Commission over the past 16 years, because it made exceptional returns, but no irregularities were found.
It was the global recession which effectively prompted Madoff's demise, as investors, hit by the downturn, tried to withdraw about $7bn from his funds and he could not find the money to cover it.
The list of Madoff's victims includes film director Steven Spielberg's charitable foundation, Wunderkinder.
UK banks were also among the victims with HSBC Holdings saying it had exposure of around $1bn. Other corporate victims were Royal Bank of Scotland and Man Group and Japan's Nomura Holdings.
But it is not just the elite and large firms who were victims of the fraud.
School teachers, farmers, mechanics and many others have also lost money.