Deutsche Bank was the only major financial institution to fail the Federal Reserve's annual stress test exam, dealing another blow to Germany's largest lender.

The Fed raised more moderate concerns about Goldman Sachs and Morgan Stanley that will limit the ability of those Wall Street banks to raise their dividends and buy back more of their stock. The stress test also revealed State Street would suffer "large losses" if one of its business partners came under financial pressure.

Despite those concerns, the Fed's stress test results reflect a US banking system that has dramatically strengthened from the financial crisis a decade ago. Regulators gave a green light to the vast majority of the 35 largest US banks.

Those banks immediately announced plans to ramp up shareholder rewards. JPMorgan Chase (JPM) announced a 43% dividend hike and plans to buy back nearly $21 billion in stock. Citigroup (C) said it will boost its dividend by 41% and buy back up to $17.6 billion worth of shares. Wells Fargo (WFC) raised its dividend modestly and said it plans to buy back $24.5 billion of stock through mid-2019.

In a stress test, the Federal Reserve considers how banks would hold up under the severe strain of a recession or financial market turmoil. Lenders are also evaluated based on qualitative factors, including risk management, internal controls and government practices.

The Fed then passes judgment on each bank's capital plan — how it rewards shareholders with higher dividends and stock buybacks.

This year's exam shows that the largest banks have "strong capital levels" and after paying dividends "would retain their ability to lend even in a severe recession," Federal Reserve Vice Chairman Randal Quarles said in a statement.

Related: Wall Street banks are healthier than ever

The glaring exception was Deutsche Bank (DB), which has stumbled repeatedly in recent years. The Fed objected to the capital plan of the German bank's US subsidiary, citing "widespread and critical deficiencies across the firm's capital planning practices."

Although the stress test showed that DB USA would survive a recession, it also found "material weaknesses," including over its data capabilities and controls, how it forecasts losses under stress and risk management functions such as internal audit.

"Together, these weaknesses raise concerns about DB USA's ability to effectively determine its capital needs," the Fed said.

The failure limits the ability of Deutsche Bank's US arm to return cash to its German parent company, senior Fed officials told reporters on a conference call. The Fed will also require Deutsche Bank to address the concerns raised by the exam.

In a statement, Deutsche Bank said its US arm has made "significant investments" to improve its capital planning, controls and infrastructure. The company said it will keep meeting with regulators to address concerns.

Related: Oops! Deutsche Bank accidentally sent a $35 billion payment

Regulators took more of a middle-ground approach with Morgan Stanley (MS) and Goldman Sachs (GS).

Those Wall Street firms won't be allowed to ramp up their dividends and buybacks beyond what they paid in recent years. That's because both Morgan and Goldman originally submitted overly aggressive plans that would have dropped their capital levels below what the Fed considers acceptable.

The Fed said the concerns were the result of a one-time accounting hit caused by the corporate tax cut, not how they would perform under stress. In the long run, banks are expected to haul in fatter profits because of the tax law.

State Street (STT), a custodian bank that is paid to safeguard clients' assets, also drew concerns from regulators.

The stress test showed that State Street would suffer losses if one of its largest trading partners defaulted. State Street will be required to take steps to address the matter, but the company was allowed to raise its dividend and buyback plan. A senior Fed official told reporters that the fix should be relatively straightforward.

The news came at something of an anxious time for banks.

The difference between short and long-term interest rates has flattened to levels not seen in a decade, making it harder for lenders to make money. The S&P Financial Index of bank stocks dropped 13 consecutive days through Wednesday. That's the longest streak on record, according to LPL Financial.