New York attorney general Eric Schneiderman has filed suit against JPMorgan over the creation and sale of mortgage-backed securities during the housing bubble, alleging that bankers from the now-JPMorgan-owned Bear Stearns perpetrated "a systemic fraud on thousands of investors."

JPMorgan acquired Bear Stearns in 2008 at a steep discount in a deal backed by the government. At the time, regulators were attempting to prevent ailing Bear from touching off a panic on Wall Street.

Having acquired Bear Stearns, JPMorgan is now legally responsible for it. Schneiderman's lawsuit is a civil action and does not name individual bankers as defendants.

The suit, filed Monday, alleges that Bear misled investors into believing that its staff had carefully evaluated the quality of the loans making up the mortgage-backed securities it was selling. In fact, the suit claims, Bear "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."

"Furthermore, even when Defendants were made aware of these problems, they failed to reform their practices or to disclose material information to investors," the complaint says.

The suit seeks the return of ill-gotten gains, as well as an unspecified total in damages and restitution. It claims that risky mortgage-backed securities issued by Bear Stearns in the years 2006 and 2007 alone suffered some $22.5 billion in losses.

Related: Going after Wall Street - and watching the clock

Mortgage-backed securities are financial products comprising groups of mortgages pooled together and sold to investors. They played a central role in the financial crisis, as subprime mortgages began to fail in large numbers with the bursting of the housing bubble. This left banks and investors saddled with these so-called "toxic assets" and helped prompt the Wall Street bailouts.

JPMorgan (JPM) spokesman Joe Evangelisti emphasized the lawsuit's focus on Bear Stearns, "which we acquired over the course of a weekend at the behest of the U.S. Government."

"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," Evangelisti said in an email. "We intend to contest these allegations."

Schneiderman was tapped earlier this year to lead President Obama's mortgage-backed securities task force, convened to investigate banks accused of packaging and selling bad mortgages in the years leading up to the financial crisis. A spokeswoman for Schneiderman declined to comment on whether similar actions were planned against other large banks.

The task forced was announced amid criticism of the government's failure to hold individuals from the financial sector criminally accountable in connection with the crisis. In the only major criminal trial to date stemming from Wall Street's role in the meltdown, a pair of former Bear Stearns hedge-fund managers were found not guilty in 2009 of falsely inflating the value of mortgage-backed assets in their portfolios.

JPMorgan shares fell 0.7% in after-hours trading Monday. Elsewhere in the sector, Bank of America (BAC) fell 0.2%, Wells Fargo (WFC) fell 0.3% and Morgan Stanley (MS)fell 0.2%.