JPMorgan Chase, the biggest U.S. bank by assets, reported a rare quarterly loss Friday after setting up a big reserve for legal expenses. The bank had to absorb a reserve for litigation expenses of $9.2 billion in the July-to-September period, pushing the lender to a loss of $380 million compared with a profit of $5.7 billion a year earlier.

While JPMorgan emerged from the global financial crisis and the subsequent Great Recession as one of the strongest U.S. banks, it has been dogged by lawsuits in recent years. Last month, JPMorgan agreed to pay $920 million and admitted that it failed to oversee trading that led to a huge $6 billion loss last year—an episode known as the London Whale. The bank is also said to be discussing an $11 billion national settlement with the Department of Justice over mortgage-backed securities. The securities lost value after a bubble in the housing market burst and helped spur the financial crisis.