JPMorgan Chase (JPM) is on the verge of a $2 billion criminal and civil settlement over allegedly turning a blind eye to Bernie Madoff’s epic Ponzi scheme, a person familiar with the matter confirmed to FOX Business.

The $2 billion figure is twice as high as previous estimates over a settlement and would represent the latest effort by the largest U.S. bank to put its legal troubles behind it.

The Madoff settlement could be unveiled as soon as this week and would include a deferred prosecution agreement, a criminal action that would be a first for a U.S. Wall Street bank.

JPMorgan would agree to pay more than $1 billion to prosecutors in Manhattan and the rest to the Office of the Comptroller of the Currency and a unit of the Treasury Department. Some of the funds would be set aside to help compensate Madoff victims.

New York-based JPMorgan declined to comment on the news.

The settlement news was earlier reported by The New York Times

An agreement would come five years after the Madoff scandal emerged, shocking the financial world.

JPMorgan served as Madoff’s main banker for 20 years and authorities allege the company ignored signs of the Ponzi scheme.

A senior JPMorgan risk manager wrote an email reporting that another bank executive “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  Ponzi scheme.”

Madoff himself has been critical of his former bank. “There’s no question that JPMorgan is guilty; they would have to be idiots to not realize what was going on,” Madoff told FOX Business’s Adam Shapiro last May.

Madoff, 75, is currently serving a 100-plus-year sentence at the Federal Correctional Complex in Butner, N.C.

The deferred prosecution agreement would suspend an indictment as long as JPMorgan acknowledges the facts of the government’s case and fixes its issues.

JPMorgan would be the first U.S. bank on Wall Street to reach such an agreement, the Times reported, citing data from a University of Virginia Law School database. Some foreign Wall Street banks such as UBS (UBS) have inked deferred prosecution agreements in recent years.

The punishment could have been even harsher, however. Prosecutors explored demanding JPMorgan plead guilty to a criminal violation of the Bank Secrecy Act, potentially jeopardizing the company’s charter as a national bank, the Times reported.

If JPMorgan agrees to the $2 billion Madoff settlement, it would bring its enormous legal bill to $20 billion over the last 12 months, highlighted by a $13 billion settlement in November related to toxic mortgage assets.

JPMorgan still faces a number of other legal headaches, including over its hiring of well-connected children in China allegedly to win business deals.

FOX Business reporter Peter Barnes contributed to this report.

Follow Matt Egan on Twitter @MattMEgan5