NEW YORK (Reuters) - Deutsche Bank AG (>> Deutsche Bank AG) has settled a U.S. lawsuit in which shareholders accused it of misrepresenting its ability to handle risks associated with mortgage debt prior to the 2008 financial crisis.

The settlement in principle was disclosed in a filing on Thursday by Deutsche Bank's lawyers in the U.S. District Court in Manhattan. Terms were not disclosed, and final paperwork is expected within 30 days, the filing said.

Shareholders accused Deutsche Bank of misleading them about its risk management and the underwriting on mortgage debt it packaged and sold, as well as being too slow to take write-downs.

They said this contributed to an 87 percent drop in the German bank's share price from May 2007 to January 2009.

The settlement came after U.S. District Judge Katherine Forrest on October 29 refused to let the case proceed as a class action, citing flaws in the methods and conclusions reached by an expert hired by the shareholders.

Denials of class certification can boost litigation costs and make it harder for plaintiffs to obtain large recoveries.

Plaintiffs included the Building Trades United Pension Trust Fund of Elm Grove, Wisconsin, and two mutual funds.

John Grant, a lawyers for the plaintiffs, did not immediately respond to a request for comment. Deutsche Bank spokeswoman Renee Calabro declined to comment.

The lawsuit is separate from Deutsche Bank's agreement last month to pay $1.9 billion (1.1 billion pounds) to settle claims it defrauded U.S. government-controlled Fannie Mae (>> Federal National Mortgage Assctn Fnni Me) and Freddie Mac (>> Federal Home Loan Mortgage Corp) in the sale of mortgage-backed securities.

The most recently settled case is IBEW Local 90 Pension Fund et al v. Deutsche Bank AG et al, U.S. District Court, Southern District of New York, No. 11-04209.

(Reporting by Jonathan Stempel in New York; Editing by Dan Grebler)