Morgan Stanley on Thursday agreed to pay more than $3.2 billion to settle allegations by state and federal authorities that it downplayed the risk of mortgages it sold in the years before the financial crisis.

In announcing the settlement, New York Attorney General Eric T. Schneiderman said the bank’s actions contributed to the collapse of the housing market.

“Today’s agreement is a significant step toward accountability and recovery,” he said.

This is the latest settlement to come out of a working group established by President Obama in 2012 to investigate wrongdoing in the mortgage market in run-up to the financial crisis. JPMorgan reached a $13 billion settlement with the group, while Citigroup reached a $7 billion agreement. The group also reached a historic $16.6 billion settlement with Bank of America.

Morgan Stanley was accused of misleading investors about the quality of mortgages it bundled up and sold. In the statement of facts, Morgan Stanley acknowledged that it increased the acceptable risk levels for loans it packaged for investors.  In a May 31, 2006 email, for instance, a Morgan Stanley employee reviewing the value of a package of mortgage-backed securities asked a colleague, “please do not mention the ‘slightly higher risk tolerance’ in these communications. We are running under the radar and do not want to document these types of things,” according to the New York Attorney General’s office.

In addition to a $2.6 billion settlement with federal authorities, Morgan Stanley agreed to pay $550 million to New York and $22.5 million to Illinois. It previously agreed to pay $1.25 billion to resolve claims by Federal Housing Finance Agency, which regulates Fannie Mae and Freddie Mac.

“Those who contributed to the financial crisis of 2008 cannot evade responsibility for their misconduct,” Principal Deputy Assistant Attorney General Benjamin C. Mizer, head of the Justice Department’s Civil Division, said in a statement.

In a statement, Morgan Stanley said it had set aside money to cover the settlement. “We are pleased to have finalized these settlements involving legacy residential mortgage-backed securities matters. The Firm has previously reserved for all amounts related to these settlements,” the company said in a statement.

Like the rest of the financial sector, Morgan Stanley has struggled recently. Its stock was down about 4 percent Thursday, but has fallen more than 31 percent so far this year.

Goldman Sachs is the last remaining of the major banks yet to reach a multi-billion settlement on mortgage-backed securities. It is unclear when and if that deal will emerge.