The settlement covers 21 major institutional investors. The mortgage-backed securities were issued by JPMorgan and Bear Stearns between 2005 and 2008. New York-based JPMorgan acquired the failing investment bank Bear Stearns in March 2008.

The deal is the latest in a series of legal settlements over JPMorgan's sales of mortgage-backed securities in the years preceding the financial crisis. As the housing market collapsed between 2006 and 2008, millions of homeowners defaulted on high-risk mortgages. That led to billions of dollars in losses for investors who bought securities created from bundles of mortgages. Those securities were sold by JPMorgan and other big Wall Street banks.

JPMorgan has also been negotiating with the US Justice Department to settle a civil inquiry into its sales of mortgage-backed securities. The bank reached a tentative deal last month to pay 13 billion dollars (£8 billion), but the negotiations have hit a stumbling block.

As part of the 13 billion dollar deal, 4 billion dollars (£2.5 billion) will resolve US government claims that JPMorgan misled mortgage finance giants Fannie Mae and Freddie Mac about risky mortgage-backed securities. That part of the deal was announced on October 25.

Fannie Mae and Freddie Mac were bailed out by the government during the crisis and are under federal control.

Mounting legal costs pushed JPMorgan to a rare loss in this year's third quarter, the first under chief executive Jamie Dimon's leadership. The bank reported on October 11 that it set aside 9.2 billion dollars (£5.7 billion) in the July-September quarter to cover the string of legal cases against the bank.

JPMorgan said it has placed a total of 23 billion dollars (£14 billion) in reserve to cover potential costs.