Morgan Stanley has struck a settlement with state and federal authorities over its role in the creation of mortgage-backed bonds prior to the financial crisis. In the years that preceded the crisis, a number of Wall Street banks purchased subprime mortgages and packaged them into bonds that ended up suffering significant losses. Morgan Stanley’s business dealings over the bonds were previously put on public display in a lawsuit filed against the bank by the American Civil Liberties Union.

In 2012, President Obama helped form a working group to deal with the flawed mortgaged-backed bonds that were at the heart of the financial crisis. The Morgan Stanley settlement is expected to be one of the last settlements to come out of that working group. Goldman Sachs is the last of the big Wall Street banks not to have completed its settlement with the group. Goldman reported last month that it expected its settlement to be as much as $5 billion.

Morgan Stanley has reportedly agreed to pay $3.2 billion to settle the charges. Roughly a year ago, Morgan Stanley said it expected to pay $2.6 billion in the settlement. According to the office of New York attorney general Eric T. Schneiderman, the settlement terms state that Morgan Stanley will pay $150 million in cash to New York State, and another $400 million towards consumer relief. Morgan Stanley said that it had set aside legal reserves to cover the agreement and would not take any additional charges in its upcoming financial results.

Morgan Stanley’s settlement is much smaller than those of large consumer banks like Bank of America. In its 2014 settlement, Bank of America paid $16.6 billion. This is because Morgan Stanley did not originate mortgages itself. Instead, the financial firm relied on subprime mortgage originators, like New Century, to supply it with mortgages for the bonds. Emails cited in the complaint suggest that Morgan Stanley employees knew that they were bending the rules to include riskier loans from these subprime mortgage originators.