All U.S. banks passed the sixth annual round of stress tests, the Federal Reserve announced Wednesday, although the U.S. arms of two foreign banks again failed.

Frankfurt-based Deutsche Bank and the Spanish bank Santander failed for the second year in a row, the central bank announced.

One U.S. bank, Morgan Stanley, passed only on the condition that it resubmit its capital plan later its year. Another, M&T Bank, had to adjust its plans to pass.

Overall, however, the news was good for U.S. banks, which avoided having the Fed block their plans for paying out dividends or buying back shares. Many of the banks immediately announced dividend boosts and stock buybacks.

The stress test scenario is essentially a major, worldwide crisis: It includes the global economy slipping into recession, unemployment soaring to 10 percent, stock markets falling by half, real estate values cratering, corporate bond yields spiking and short-term Treasury interest rates falling into negative territory. This year's scenario was even more negative than last year's.

One purpose of the stress tests is to increase confidence in the firms that do pass, on the grounds that they are well-capitalized to withstand severe pressures. Regulators in the past have credited the stress tests conducted in early 2009 with helping to stem the financial crisis for the same reason.

Fed governor Daniel Tarullo touted the results as a step forward for the safety of the financial system, saying that "the participating firms have strengthened their capital positions and improved their risk-management capacities."

The 33 banks tested have doubled their capital since the worst days of the financial crisis, according to the Fed. As a share of risk-weight assets, the average capital ratio for the firms has risen from 5.5 percent to 12.2 percent, representing an additional $700 billion in capital.

Bank industry groups praised that progress in reaction to Wednesday's results.

"[T]he U.S. banking system has never been stronger and is now able to withstand the shock of even the highly unlikely" stress scenario, said John Dearie, acting CEO of the Financial Services Forum, a group that represents large banks. That progress, Dearie suggested, means that it's important for post-crisis regulations to be "calibrated" to allow banks more latitude.

Morgan Stanley head James Gorman said that the bank's managers "fully expect to meet [the Fed's] requirements within the established timeframe."

The stakes are high for the tests. Banks spend massive resources preparing for them, and in the past it has been thought that the jobs of bank leaders were on the line in the tests.

Michael Corbat, the Citigroup CEO who has faced pressure in recent years over the stress test, announced $8.6 billion in stock buybacks with the statement that the bank is an "indisputably safe and strong institution."

Federal Reserve officials, however, have signaled that they are not satisfied with the hurdles they have put in place in this year's version of the stress tests.

Two members of the Fed's Board of Governors suggested earlier this month that in next year's exercise the eight biggest banks may have to clear the tests while maintaining higher levels of capital. Doing so could force the banks to consider downsizing, according to one Fed member.

Although each of the eight largest banks in the U.S. maintained capital above the minimum requirement in this year's stress test, several would have to raise more capital to meet the additional "surcharge" they could face in the future. Those include Bank of America, Citigroup, Goldman Sachs, JPMorgan Chase, Morgan Stanley, State Street, and Wells Fargo. Only the Bank of New York Mellon would have met the requirement in this year's test.

The only two banks to fail the stress tests in 2015 were Deutsche Bank and Santander. Four U.S. banks, however, passed only after being allowed to revise their capital plans or on a provisional basis: Bank of America, Goldman Sachs, JPMorgan Chase, and Morgan Stanley.

Bank of America's passing grade Wednesday came as a relief to the bank, which had been flagged for problems in three of the past five stress tests. The bank announced a $5 billion stock buyback Wednesday afternoon.