JP Morgan Chase and federal authorities are close to a$2 billion settlement over the bank's ties to financier Bernard L. Madoff. (STAN HONDA/AFP/Getty Images)

JPMorgan Chase is close to an agreement to pay federal authorities about $2 billion to resolve investigations into whether the bank failed to alert the government to Bernard L. Madoff’s Ponzi scheme, a person familiar with the talks said Thursday.

The deal would include a deferred-prosecution agreement that would give the Justice Department the right to pursue criminal charges against JPMorgan if the bank fails to live up to the settlement, according to the person familiar with the negotiations who was not authorized to speak publicly so spoke on the condition of anonymity.

As part of the deferred prosecution, the bank would acknowledge the facts of the government’s case. The billions of dollars in penalties would be divvied up between the Justice Department and the Office of the Comptroller of the Currency, the bank’s primary regulator. The settlement could be finalized before the end of the year, the person said.

The Justice Department and the OCC declined to comment on the case, as did officials at JPMorgan. The bank has long maintained that it was not aware of Madoff’s scheme, much like the regulators and clients he deceived.

The tentative deal arrives the same week as the five-year anniversary of Madoff’s arrest for duping clients in a $50 billion Ponzi scheme. Madoff, who is serving a 150-year prison sentence, banked with JPMorgan for two decades before authorities took him down.

Investigators at the OCC have been examining whether JPMorgan failed to comply with a federal law that requires banks to file a “suspicious activity” report when a transaction raises alarm. JPMorgan reported its suspicions to British authorities in 2008 but did not alert anyone in the United States.

Manhattan U.S. Attorney Preet Bharara, whose office declined to comment, has been leading the government’s investigation into JPMorgan. Another person familiar with the probe said that prosecutors are focused on violations of the Bank Secrecy Act, a law that calls on financial firms to maintain anti-money-laundering controls.

Earlier this year, JPMorgan chief executive Jamie Dimon told employees in a memo that the bank is spending about $1 billion to improve compliance operations. Risk and compliance problems have been at the heart of several federal investigations, including JPMorgan’s disastrous “London Whale” trading losses last year.

“If you don’t acknowledge mistakes, you can’t fix them and learn from them,” Dimon said in the September memo. “So now, as in the past, we are recognizing our problems, rolling up our sleeves and fixing them.”

It has been a trying year for JPMorgan. Last month, the bank gained the dubious distinction of paying the largest penalty dealt to a single company with its $13 billion settlement to resolve allegations that it sold faulty mortgage securities.

The financial goliath is also embroiled in federal investigations into tactics used to collect credit card debts and its role in the ma­nipu­la­tion of a key interest-rate benchmark that affects trillions of dollars of bonds, among other matters.

And those are just the government cases. There are dozens of private lawsuits against JPMorgan stemming from its acquisition of Bear Stearns, its relationship with Enron and its role in Lehman Brothers’ bankruptcy proceedings.

JPMorgan, like many Wall Street firms, is also fighting off five lawsuits from Madoff investors that claim the bank aided and abetted his fraud.

One key lawsuit, brought by Irving Picard, the trustee liquidating Madoff’s firm, revealed what it called internal communications suggesting that bank executives were aware of Madoff’s schemes as far back as 1997. At the time, according to the complaint, another financial institution raised concerns about his transactions.

According to the lawsuit, a Madoff employee would deposit a $1 million to $10 million check into his account at JPMorgan almost every day, after drawing down the same amount at the other institution. The next day, the same amount would be wired back from Madoff’s JPMorgan account to the other institution to make it appear he had twice as much money during that period.

The lawsuit cited a 2007 e-mail from John Hogan, then a senior risk officer at JPMorgan, discussing the suspicions of another bank executive.

“For whatever it’s worth, I am sitting at lunch with Matt Zames who just told me that there is a well-known cloud over the head of Madoff and that his returns are speculated to be part of a Ponzi scheme,” Hogan wrote, according to the lawsuit.

Despite nagging questions about Madoff’s operations, JPMorgan did not alert regulators and continued to handle billions of dollars for his brokerage firm, according to the complaint. Picard claims JPMorgan earned an estimated $500 million in fees, interest payments and revenue from the firm.

A federal appeals court dismissed some of Picard’s claims in June, but the trustee has requested a Supreme Court review. Picard sued JPMorgan for $6.4 billion. He has recouped $9.5 billion for Madoff’s victims and has filed similar lawsuits against Swiss banking giant UBS and HSBC.