The settlement, which deferred the criminal charges against the bank until January 8 2016, requires JPMorgan to pay a $1.7 billion forfeiture and improve its anti-money laundering controls. If it meets the terms by the appointed date, prosecutors can dismiss the charges against it.

U.S. district Judge P. Kevin Castel approved the deferred prosecution agreement during a short hearing Wednesday, saying "I find the need to require judicial intervention to protect the integrity of the process is not necessary."

Appearing on behalf of the bank, JPMorgan General Counsel Steven Cutler entered "not guilty" pleas to two criminal charges of violating the Bank Secrecy Act. Prosecutors charged the bank with violating the act by failing to maintain adequate anti-money laundering controls and failing to file a suspicious activity report.

Dressed in a gray suit and a blue tie, the silver-haired Cutler did not speak except to affirm that he was authorized to represent JPMorgan and that he had taken the steps necessary to enter into the settlement agreement with prosecutors. He declined to comment after the hearing.

JPMorgan is paying $2.6 billion in all to settle criminal, civil and regulatory actions against it related to its business with Madoff, who pleaded guilty to fraud in 2009 and is serving a 150-year prison term. Even as the bank cut its exposure to Madoff's fund to minimize its losses in what ended up being a $17.3 billion Ponzi scheme, JPMorgan never shared its doubts with U.S. authorities, government prosecutors said.

(Reporting by Emily Flitter; additional reporting by Jonathan Stempel; Editing by Bernard Orr)

By Emily Flitter