Image caption The New York Attorney General wants JPMorgan to pay damages

The New York Attorney General has sued JP Morgan Chase for allegedly defrauding investors who lost more than $20bn (£12bn) on mortgage-backed securities sold by Bear Stearns.

JP Morgan bought the investment bank Bear Stearns in March 2008.

It said that it would contest the allegations.

This is the first action to come out of a working group created by US President Barack Obama looking into the causes of the 2008 financial crash.

JP Morgan said: "The NYAG civil action relates to Bear Stearns, which we acquired over the course of a weekend at the behest of the US government. This complaint is entirely about historic conduct by that entity."

Crisis spark

All this is a bit like the fifth instalment in a series of horror films, with each succeeding production gorier than the preceding one

US mortgage-backed securities were the investment products that sparked the global financial crisis in 2008.

In essence, each security or bond was linked to pools of US mortgage loans, many of which were classified as sub-prime - mortgages awarded to high-risk and low-wage homeowers.

When many of those homebuyers defaulted on their mortgages as the US property bubble burst, it turned the linked securities into bad debt.

This caused billion-dollar losses at banks, who were forced to write down the value of their investments.

Banks around the world were affected, not just those in the US, because the securities were resold globally.

The securities had been widely purchased because rating agencies had mistakenly given them the highest possible credit rating.

As banks realised they were sitting on huge liabilities, they halted lending to each other, freezing up the global financial system in the process and making it harder for businesses and individuals to borrow funds.

'Ignored deficit'

The civil suit, filed by New York Attorney General Eric Schneiderman, accuses Bear Stearns of failing to ensure the quality of loans underlying residential mortgage-backed securities.

Crisis jargon buster Use the dropdown for easy-to-understand explanations of key financial terms: AAA-rating AAA-rating The best credit rating that can be given to a borrower's debts, indicating that the risk of borrowing defaulting is minuscule.

It relates to securities sold by Bear Stearns in 2006 and 2007 - before it was taken over by JP Morgan.

The legal action claims the bank "systematically failed to fully evaluate the loans, largely ignored the defects that their limited review did uncover, and kept investors in the dark about both the inadequacy of their review procedures and the defects in the underlying loans".

It says that this led to the inclusion of mortgages on which borrowers were likely to default, and that investor losses in 2006 and 2007 totalled more than a quarter of the original £87bn value of the securities.

The NYAG wants the company to pay an undisclosed amount of damages for investor losses "caused, directly or indirectly, by the fraudulent and deceptive acts".

The BBC's business editor Robert Peston said there were some "jaw-dropping elements" exposed in the suit.

He said it disclosed "a manic and frenzied culture of procuring and packaging as many mortgages as humanly possible, to maintain the bonds spewing from the investment bank, to generate as much short-term profit as humanly possible".

"All this is a bit like the fifth instalment in a series of horror films, with each succeeding production gorier than the preceding one," adds our editor.

A JPMorgan spokesman accused the NYAG of not giving the bank a sufficient chance to discuss the accusations before launching the legal action.

He said: "We're disappointed that the NYAG decided to pursue its civil action without ever offering us an opportunity to rebut the claims and without developing a full record - instead relying on recycled claims already made by private plaintiffs.

"We will nonetheless continue to work with members of the president's RMBS Working Group and are fully co-operating with their inquiries."