How worried should Wall Street be? When Jamie Dimon announced in early September that JPMorgan Chase & Co. had bolstered its litigation reserves by $9.2 billion to $23 billion, leading the bank to report its first quarterly loss under his watch, the collective intake of breath across Wall Street was sharp. “This is very painful for the company,” chairman, president and CEO Dimon told analysts. Now that JPMorgan appears to be on the cusp of finalizing a mega-settlement with the U.S. Department of Justice, rumored to be in the region of $13 billion, the banking industry is bracing for a wave of litigation expenses that could roll on for years.

The JPMorgan deal follows an $11.6 billion settlement between Bank of America and Fannie Mae earlier this year and a separate $8.5 billion settlement between federal regulators and ten banks, including BofA, over mortgage foreclosures, not to mention a string of smaller fines over everything from municipal bond price rigging to money laundering. Having weathered nearly five years of criticism that they’ve been too soft on Wall Street, the feds are beginning to flex some serious muscle.

“Clearly, something has changed in the last year or so, and it’s worrisome,” says Jason Goldberg, a New York–based banking analyst with Barclays Capital.

And this may be just the start. Although details of the total mortgage settlement are yet to be finalized, JPMorgan has confirmed that $5.1 billion will go to the Federal Housing Finance Agency for defective mortgages sold to Fannie Mae and Freddie Mac, the government-controlled mortgage finance firms, in the run-up to the 2008 crisis. The FHFA sued 18 banks for more than $200 billion over subprime-era mortgage securities in late 2011; 14 of those suits are outstanding, so there’s a lot of punishment to come. Using JPMorgan’s settlement as a guide, analysts estimate that the 14 banks might have to pay more than $20 billion to settle the remaining FHFA claims. Whether the stock market will care is debatable. The stock prices of Wall Street’s five largest banks have increased between 20 percent (JPMorgan) and more than 50 percent (Morgan Stanley) since January 1. The big banks are still an attractive long-term investment opportunity, argues Goldberg, “especially when you consider that they would benefit from the taper and higher interest rates” ahead.