JPMorgan Chase today posted its first quarterly loss under chairman and chief executive Jamie Dimon after a tangle of legal and regulatory probes cost the biggest US bank $7.2 billion.

Dimon managed to avoid posting losses during the financial crisis as the bank shied away from the worst sub-prime mortgage assets.

But now legal woes, at least some tied to banks that JPMorgan bought during the crisis, are taking a toll.

JPMorgan posted a loss of $380m, or 17 cents per share, for the third quarter, its first loss since the second quarter of 2004.

A year earlier it reported a profit of $5.71 billion, or $1.40 a share.

Excluding litigation expenses and other special items, the company posted a profit of $5.82 billion, or $1.42 per share.

Analysts on average had forecast earnings of $1.17 per share excluding special items, according to Thomson Reuters. It was not immediately clear if the results were comparable.

The legal expenses - $9.2 billion, or $7.2 billion after taxes - include money it is setting aside for future settlements. The bank disclosed exactly how much it has set aside for settlements, fines and other legal expenses - $23 billion.

"While we expect our litigation costs should abate and normalise over time, they may continue to be volatile over the next several quarters," Dimon said in a statement.

JPMorgan faces a welter of regulatory issues, including a Securities and Exchange Commission investigation into possible bribery in the hiring of sons and daughters of executives of Chinese state-owned companies, possibly fraudulent sales of mortgage securities, and its role in setting certain benchmark borrowing rates.

The bank has been focusing on its mortgage issues recently. In September, it tried to reach a settlement with the US Department of Justice and other federal and state agencies in which it could have paid as much as $11 billion to resolve claims against the bank over its mortgage businesses.

Dimon went to Washington to meet with US Attorney General Eric Holder on September 25 as part of the talks, but no deal has resulted.

Some of those claims relate to mortgage bank Washington Mutual and investment bank Bear Stearns, two failing companies that JPMorgan took over in 2008.

Regulators pressed JPMorgan to acquire both companies, a fact that Dimon alluded to in a statement today. He noted that the bank was seeking a fair settlement with the government on mortgage related issues, "and one that recognises the extraordinary circumstances of the Bear Stearns and Washington Mutual transactions, which were undertaken at the request or encouragement of the US Government."