The federal government is believed to working on an agreement with the bank to drop several criminal investigations, notably into the sale of shoddy mortgage securities to Fannie Mae and Freddie Mac (the government-controlled mortgage finance companies) by Bear Stearns and Washington Mutual, now owned by JP Morgan.

In simple terms these banks made huge profits lending money to poor people to buy overpriced homes and then packaged up the bad loans, labeling them high quality for sale to the government and overseas investors. When the 2008 economic crisis hit, the house prices crashed and many homeowners lost their jobs, making them unable to repay their loans.

The $13 billion agreement has been trumpeted as the biggest payout levied on a single company, although there is some doubt about the veracity of such a statement.

The $4 billion in payments to struggling homeowners are necessary for the bank, which would otherwise lose even more money if it had to evict borrowers by foreclosing on them. Reuters also reports that JP Morgan could be allowed to get a tax deduction for the fines paid which will reduce its actual cash costs by $4 billion.

Critics say that the government has failed to protect the public interest.

"A settlement of this kind would release JPMorgan and its officers from civil and criminal liability for a wide range of alleged frauds,” writes William Black, a former bank regulator who led investigations of the savings and loan crisis of the 1980s. “JPMorgan should pay the damages it caused to others through fraud. In cases where a firm's senior officers engage in a wide range of frauds, the courts should award punitive damages against the officers and the firm.

Not everyone is as upset. The bank enjoys plenty of support in the mainstream media, notably because JP Morgan CEO Jamie Dimon has “assiduously cultivated a following among financial journalists, who love his comeback-kid life story — after his ouster as heir apparent to Sanford Weill at Citigroup,” says USA Today.

Alex Pareene, a writer at Salon, pointed out the irony of praising a bank for making greater profits by comparing the fine to one imposed on a restaurant. "No one would say 'Yeah, but the restaurant's making a lot of money. There's only a little bit of poison in the food,” he said on CNBC.

Senior Wall Street executives are definitely relieved by the deal. After all 25 years ago, some 1,000 bankers were convicted by the Justice Department, for their role in the savings and loans crisis. CEOs like Charles Keating Jr. of Lincoln Savings and Loan and David Paul of Centrust Bank, went to jail for years.

* Editor's note: An earlier version of this article stated that JP Morgan would escape criminal prosecution. As a reader pointed out, the company may yet face charges in California. We apologize for the error.