U.S. investment bank JPMorgan Chase has agreed to pay $1.7 billion US to settle federal claims against the bank for its role in Bernie Madoff's $65-billion Ponzi scheme.

The bank has agreed to pay the fine to settle pending charges that it ignored numerous warning signs about the largest financial fraud in U.S. history.

It's the largest fine ever levied by regulators for a violation of the Banking Secrecy Act.

Under the agreement announced by U.S. Attorney Preet Bharar in New York, criminal charges against the bank 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.

Charges could still return after that point.

Madoff, 75, is currently serving a 150-year prison term.

Ponzi scheme ran decades

The bank was Madoff's main lender for his multi-decade Ponzi scheme, which unravelled in 2008. The $60 billion in assets he claimed to be managing were proven to be fictitious, as bankruptcy trustees have thus far only manged to recover less than $10 billion for thousands of investors.

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 fine is the latest in a series of fines for JPMorgan last year.

In November, the bank paid $13 billion to settle claims related to its activities in the mortgage market before the crash of 2008.

The bank has still set aside as much as $23 billion to settle other disputes related to mortgage bonds.