The Federal Reserve is closing the book on sanctions against U.S. banks over improper handling of post-crisis mortgage foreclosures, fining firms including Goldman Sachs Group and the IndyMac successor formerly chaired by Treasury Secretary Steven Mnuchin.

In an enforcement case that has stretched across seven years, the Fed is ending its role by fining five companies, the agency said Friday. More than $35 million in new penalties include $14 million for Goldman Sachs, $8 million for Morgan Stanley, $4.4 million for U.S. Bancorp, $3.5 million for PNC Financial Services Group and $5.2 million for CIT Group, which had purchased OneWest Bank (the firm that bought IndyMac).

Mnuchin was chairman of OneWest and Comptroller of the Currency Joseph Otting was its chief executive when the firm faced earlier foreclosure sanctions.

The Fed had earlier fined other banks, including Bank of America, JPMorgan Chase, Ally Financial, SunTrust Banks and HSBC Holdings.

After the banks were accused of botching thousands of foreclosures in 2011, the Fed and other regulators required lenders to fix problems in their servicing of residential mortgages. The Fed’s termination of the earlier enforcement actions means the regulator is satisfied that the firms have improved their practices, the agency said.

IndyMac failed in 2008 as one of the mortgage meltdown’s major casualties. That same year, Mnuchin, a former Goldman Sachs banker, led a group of investors that included hedge fund billionaire John Paulson and finance giant George Soros in buying the bank.

IndyMac’s name was changed to OneWest and Mnuchin hired Otting, a veteran West Coast banker, to run it. The firm — beset by the foreclosure scrutiny — was sold off to CIT in 2015, and Mnuchin and Otting joined the Trump administration last year.

The 2011 actions from the Fed, Office of the Comptroller of the Currency and Federal Deposit Insurance Corp. were among the largest coordinated enforcement efforts in the years following the crisis.

The regulators first tried to set up what was known as the Independent Foreclosure Review in which the largest U.S. mortgage firms were meant to comb through thousands of foreclosures looking for errors, but the agencies eventually decided that effort was overly time-consuming and ineffective.

So, in 2013 they fined firms hundreds of millions of dollars and ordered them to pay out about $3.6 billion in cash to compensate borrowers, though many of the firms had lingering problems complying with orders to fix their internal systems.

The OCC’s settlements with banks were completed a year ago, including final fines of $70 million for Wells Fargo and $48 million for JPMorgan after the two were accused of failing to move fast enough to satisfy the earlier orders.

In 2014, the Fed was faulted by its internal watchdog for its handling of complex settlements. Its Office of Inspector General said lax preparation and management led to poor execution of the settlement with the mortgage servicers.

Bloomberg News