Deutsche Bank AG has agreed to pay $32.5 million to investors who said they were misled about the quality of mortgage loans sold to them as highly rated securities right before the U.S. housing market imploded, court papers show.

Preliminary settlement papers were filed on Monday in the federal court in Central Islip, New York, on behalf of investors who brought the 2008 lawsuit, including lead plaintiff Massachusetts Bricklayers and Masons Trust Funds. The settlement must still be approved by U.S. District Judge Leonard Wexler.

The proposed settlement is not only fair, reasonable and adequate, but represents an outstanding recovery, the filing said.

Renee Calabro, a Deutsche Bank spokeswoman, said, We are pleased to have resolved this matter.

The settlement is among a handful with major banks to resolve claims that investors were misled into buying mortgage-backed securities that were much riskier than they had appeared.

It would resolve claims that Deutsche Bank made material misstatements and omissions in 2006 offering documents regarding the underwriting and appraisal practices of the mortgage loans bundled into securities contained in two trusts.

According to the investors, the offering documents understated the risk that the loans could default, while Deutsche Bank used credit-default swaps to profit as the securities lost value.

According to a 2010 report, default rates in a certificate issued by one of the trusts reached as high as 49 percent of the underlying pool of loans, the plaintiffs said.

In December, Bank of America Co's Merrill Lynch unit said it would pay $315 million to resolve a lawsuit brought by investors in 18 mortgage-backed securities trusts.

A month earlier, Deutsche Bank and Citigroup Inc agreed to pay a combined $165.5 million in a settlement with the National Credit Union Agency over their roles in underwriting mortgage-backed securities purchased by five credit unions.

And last July, Wells Fargo & Co and a group of underwriters paid $125 million to investors in 28 mortgage-backed securities offerings.

The case is Massachusetts Bricklayers and Masons Trust Funds et al v. Deutsche Alt-A Securities Inc et al, U.S. District Court, Eastern District of New York, No. 08-3178.

(Reporting by Jessica Dye; Editing by Steve Orlofsky)