JP Morgan has reported net losses of $400 million (£296 million) for their third quarter as the company was hit by legal costs related to mortgage irregularities.

The costs , totalling $10.8 billion before tax, came from litigation costs associated with mortgages originated by Washington Mutual and Bear Stearns , firms that JP Morgan bought after their collapse in 2008.

In the same quarter of 2012 JP Morgan posted a net profit of $6.5 billion

This is the first time the bank has made a loss since 2004 and the first time CEO and chairman Jamie Dimon has overseen a loss since his appointment in 2005.

Speaking on the loss Dimon said: "While we had strong underlying performance across the businesses, unfortunately, the quarter was marred by large legal expense. We continuously evaluate our legal reserves, but in this highly charged and unpredictable environment, with escalating demands and penalties from multiple government agencies, we thought it was prudent to significantly strengthen them. While we expect our litigation costs should abate and normalize over time, they may continue to be volatile over the next several quarters."