Moody’s Corp. said Friday it agreed to pay $864 million to the U.S. Department of Justice and several states in connection with bond grades it issued before the 2008 housing-market collapse.

The agreement marks what is expected to be the last in a series of deals in the waning days of President Barack Obama’s administration closing investigations into the financial crisis.

Late last month, the Justice Department struck multibillion-dollar settlements with Deutsche Bank AG and Credit Suisse Group AG over toxic securities and separately filed a lawsuit against Barclays PLC alleging misconduct in billions of dollars in mortgage securities sold in the mid-2000s.

Barclays said it would seek to dismiss the case and said it believed the claims were “disconnected from the facts.”

Moody’s had said in October it expected the Justice Department to sue the company in connection with its mortgage-bond ratings, but many companies—and government officials—have scrambled to close out long-running investigations in advance of President-elect Donald Trump taking office next week.