FILE - In this May 11, 2012, file photo, people stand in the lobby of JPMorgan Chase headquarters in New York. JPMorgan Chase & Co., already beset by other costly legal woes, has agreed to pay $1.7 billion to settle criminal charges accusing the bank of ignoring obvious warning signs of Bernard Madoff's massive Ponzi scheme, federal authorities said Tuesday, Jan. 7, 2014. (AP Photo/Mark Lennihan, File)

NEW YORK (AP) — JPMorgan Chase & Co., already beset by other costly legal woes, has agreed to pay $1.7 billion to settle criminal charges that it ignored obvious warning signs of Bernard Madoff's massive Ponzi scheme, federal authorities said Tuesday.

The $1.7 billion represents the largest ever forfeiture by a U.S. bank and the largest Department of Justice penalty for a Bank Secrecy Act violation, the government said.

The settlement includes a so-called deferred prosecution agreement that requires the bank to acknowledge failures in its protections against money laundering but also allows it to avoid criminal charges. No individual executives were accused of wrongdoing.

The deal was announced by the office of U.S. Attorney Preet Bharara, who scheduled an afternoon news conference to detail the agreement to resolve criminal charges: two felony violations of the Bank Secrecy Act in connection with the bank's relationship with Bernard L. Madoff Investment Securities, the private investment arm of Madoff's former business.

Under the agreement, the criminal charges will be deferred for two years as JPMorgan admits to its conduct, pays the $1.7 billion to victims of Madoff's fraud and reforms its anti-money laundering policies, prosecutors said in a release.

A statement of facts included in the agreement describes internal communications at JPMorgan expressing concerns about how Madoff was generating his purported returns. It says executives were disturbed by the fact that Madoff wouldn't let the bank examine his books.

"How much do we have in Madoff at the moment?" a bank analyst wrote in a 2008 email. "To be honest, the more I think about it, the more concerned I am."

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

It noted that it filed a suspicious activity report in the United Kingdom in late October 2008, but not in the United States. The fraud was revealed with Madoff's arrest in December 2008.

"We do not believe that any JPMorgan Chase employee knowingly assisted Madoff's Ponzi scheme," the bank said. "Madoff's scheme was an unprecedented and widespread fraud that deceived thousands, including us, and caused many people to suffer substantial losses."

It said it was making "significant efforts" to strengthen its anti-money-laundering practices and believed "the lessons we have learned will make us a stronger company."

Its shares fell 55 cents to $58.45 in morning trading Tuesday.

The deal was similar to one reached in late 2012 with the British bank HSBC, which agreed to pay $1.9 billion to settle claims it laundered money for Iran, Libya and Mexico's murderous drug cartels. Some observers called the HSBC settlement - which included a $1.25 billion forfeiture and $655 million in civil penalties - an example of the government stopping short of bringing criminal charges against a big bank or its executives because such prosecutions could be devastating enough to cause the institution to fail.

JPMorgan was Madoff's primary bank in the later years of a multi-decade fraud that ended in 2008 when he revealed to the FBI that his investment advisory business was a Ponzi scheme.

Account statements for thousands of clients showing $60 billion in assets were fiction. Of the roughly $17.5 billion in principal that was real, most of it was gone.

Since then, a court-appointed trustee has recovered more than $9.5 billion to redistribute to burned clients. The trustee sued JPMorgan for $6.4 billion in 2010, accusing the bank of being "willfully blind" and "thoroughly complicit" in the fraud, but an appeals court found in 2012 that he had no legal standing to make the claim.

The JPMorgan settlement is the latest in a series of major deals it has made to resolve its legal troubles. In November, the bank agreed to pay $13 billion over risky mortgage securities it sold before the financial crisis - the largest settlement to date between the Justice Department and a corporation.

JPMorgan still has several lawsuits pending against it related to the high-risk mortgage bonds that soured after the housing market collapsed in 2007. There's also an ongoing criminal investigation led by the office of U.S. Attorney Benjamin Wagner in Sacramento, Calif.

The bank may be negotiating or litigating over the issue for years and has set aside $23 billion to cover those costs. JPMorgan told regulators in a filing in October that it may need as much as $5.7 billion more.

Madoff, 75, pleaded guilty and is serving a 150-year prison term.

___

AP Business Writer Marcy Gordon in Washington contributed to this report.