NEW YORK — The financial crisis has finally caught up with Jamie Dimon.
As leader of JPMorgan Chase & Co., he steered the nation's largest bank through the Wall Street collapse of 2008. At the prodding of panicked U.S. regulators, the mighty New York firm swallowed two teetering rivals, sparing financial markets even more turmoil.
Now, even as other troubled firms are emerging from the wreckage, JPMorgan finds itself increasingly weighed down with the baggage of the crisis and other missteps since. The toll: at least $23 billion the bank has set aside to handle mounting litigation costs.
The bank disclosed that figure Friday along with the firm's first quarterly loss since 2004 and the first under Dimon's watch. The $380-million loss contrasts with a profit of $5.7 billion during the same period a year earlier.
"It's quite a shock," said Erik Oja, a banking analyst at S&P Capital IQ. "They didn't lose any money at all in the height of the financial crisis. But now, because of the acquisition of Washington Mutual, they are faced with an immense legal bill."
The legacy woes from WaMu — the giant Seattle savings and loan that overdosed on high-risk mortgage lending — account for much of a potential $11-billion settlement JPMorgan has been discussing with the U.S. Justice Department and states' attorneys general.
But the bank's troubles go beyond the WaMu acquisition. The bank also faces steep penalties stemming from Bear Stearns, the ill-fated investment bank it took over in 2008. JPMorgan is now on the hook for junk mortgage investments that Bear packaged and sold to investors.
Other big banks have problems too, including Wells Fargo & Co., which reported a larger-than-expected slowdown in its market-leading mortgage business Friday.
But despite the sharp drop-off, especially in home refinancing, Wells reported its third-quarter earnings rose 13%, beating Wall Street's expectations. The San Francisco bank is "beautifully positioned" to benefit from an improving economy, Timothy Sloan, Wells Fargo's chief financial officer, said in an interview. The bank has increased earnings in 15 consecutive quarters, Sloan noted.
"As you start to eliminate some of the head winds, the opportunities are huge," he said.
Wells, the largest bank based in California, said it earned $5.6 billion, or 99 cents per share, up from $4.9 billion, or 88 cents, in the third quarter of 2012. Deposit growth was strong and overall loan balances at Wells rose 4%, with growth in commercial and industrial, auto, credit card and foreign lending.
Wells Fargo's crisis-era takeover of Wachovia has panned out much better than JPMorgan's purchases. The strong earnings report owed to Wells having sharply pared down its holdings of soured loans.
Meanwhile, JPMorgan finds itself in the cross hairs of federal and state civil, regulatory and criminal probes involving last year's "London whale" trading losses, as well as credit card litigation and Bernard Madoff's Ponzi scheme.
Dimon, in a call with analysts, conceded that the bank's reversal of fortune troubled him.
"Obviously it's very painful for me personally, because I agree with you — I don't like losing money, obviously, for my shareholders," said Dimon, the chairman and chief executive.
JPMorgan booked $9.2 billion of the $23 billion in legal expenses in the third quarter. Excluding those costs, the bank would have reported quarterly net income of $5.8 billion, or $1.42 a share, beating Wall Street estimates.
While the bank otherwise reported strong profit growth in consumer lending, investment banking and asset management, quarterly revenue slid 8% to $23.9 billion.
Shares of both banks were essentially flat Friday despite a rally on Wall Street. JPMorgan stock lost 1 cent to $51.52, while Wells' stock shed 1 cent to $41.43. The Dow Jones industrial average, meanwhile, rose 111.04 points, or 0.7%, to 15,237.11.
Mortgage banking profit slid at JPMorgan and Wells.
Wells' mortgage banking income fell 43% to $1.61 billion, with originations down by 42%. Its pipeline of mortgages in progress was $35 billion, down from $97 billion a year earlier and $63 billion at the end of the second quarter. And its profit margin on home loans sold to investors narrowed.