JP Morgan Chase & Co., the nation's largest bank, agreed to pay more than $2 billion for ignoring red flags about Bernard Madoff's Ponzi scheme but will avoid a criminal money-laundering conviction if it reforms its internal policing, authorities said Tuesday.

Almost all of the money, including $1.7 billion to settle criminal charges and a $350 million civil penalty, will go to compensate victims of a fraud that officials said the JPMorgan could have stopped if it did its legal duty. The government said in court filings that JPMorgan executives discussed a "cloud over the head" of Madoff and called his returns "too good to be true" in emails, and took $300 million of its own money out of funds invested with him -- but never alerted regulators.

"JP Morgan as an institution failed and failed miserably," Manhattan U.S. Attorney Preet Bharara said at a news conference to announce the deal.

JPMorgan and its predecessor financial institutions were Madoff's primary banks from 1986 until he was arrested and his investment company collapsed in 2008. Yesterdays announcement climaxed a five-year probe of the bank's role.

The bank, which also agreed to pay a $13 billion fine in November for misconduct in the sale of mortgage securities before the financial crisis said the "lessons" learned in the Madoff affair would make it stronger.

"We could have done a better job pulling together various pieces of information and concerns about Madoff from different parts of the bank over time," a JPMorgan statement said.

advertisement | advertise on newsday

Under yesterday's settlement, Bharara's office filed two felony charges against JPMorgan for violation of the Bank Secrecy Act, which requires banks to take steps to stop fraud, but agreed to defer the prosecution and dismiss the charges after two years if the bank adopts reforms.

Bharara said the $1.7 billion payment is the largest criminal forfeiture against a bank ever, and will not be tax deductible.

He said that getting a conviction was not "in the interest of justice" because it could delay compensation to victims and harm innocent shareholders by potentially destroying the bank.

Although individual bank executives were lax, prosecutors felt charges against individuals were not warranted.

"The appropriate charge was against the bank," Bharara said. "This is a statute directed against institutional failure."