Morgan Stanley will pay $3.2bn (£2.2bn) to US authorities to settle claims that it misled investors about risky mortgage bonds sold before the financial crisis.

In 2015, a tentative deal to pay $2.6bn was announced, but New York authorities pushed to increase that amount.

Morgan Stanley acknowledged it had misrepresented the quality of the mortgage bonds.

The bank said it had previously set aside funds for the settlement.

"Today's settlement will deliver resources to the families and communities that need them the most, while helping New Yorkers avoid foreclosure, and spurring the construction of more affordable housing units statewide," said Eric Schneiderman, New York's attorney general.

The settlement will be spread across state and federal authorities in the form of fines and consumer relief.

New York's Attorney General said $550m of the deal will be allocated to New York.

Morgan Stanley's settlement is far less than peers like Bank of America, which paid $16.65bn.

This is in part because Morgan Stanley did not issue the original mortgages itself, but instead purchased home loans from other banks and packaged them together to sell as bonds to investors.

Morgan Stanley admitted knowing the mortgages were risky, but was cleared of some culpability because it did not issue mortgages to home buyers it suspected would not be able to pay them.

This is one of the last deals connected to pre-financial crisis mortgage bond sales that the Financial Fraud Enforcement Task Force -which originated that charges- is likely to bring.