Most of the largest banks passed their annual stress test, according to the Federal Reserve, in a conservative report card that underscored the recovery of the financial sector but called out a few laggards, including Citigroup.

The Fed announced the results in an earlier-than-expected release on Tuesday. JPMorgan Chase pulled the trigger on announcing its own glowing marks before the Fed's release, and helped lift the stock market.

But the failing grade for Citigroup, the nation's third-largest bank, was a shock. Going into the tests some analysts felt it had a better chance of a positive surprise than any other financial institution.

The Fed said on Tuesday that 15 of the 19 banks tested would have enough capital, even if they suffered a financial shock that would see unemployment hit 13 percent and housing prices drop 21 percent.

The results paved the way for many of the passing banks to announce highly anticipated plans to boost dividends and buy back stock.

The outcome showed a middle-of-the-road approach. The Fed failed enough banks to give the tests credibility and to elicit industry outcries about the tests being too tough, but it reassured markets that the U.S. bank industry is generally healthy.

Overall, we can't complain that these tests weren't rigorous enough, and it's good to know that most banks would at least survive another global financial meltdown, said Paul Ashworth, chief U.S. economist at Capital Economics in Toronto.

MetLife, the largest life insurer in the United States, was also among the four financial institutions that failed the exam, which applied worst-case stress scenarios looking out through the end of 2013.

Ally Financial and SunTrust were also at the bottom of the heap.

Among the winners was JPMorgan, which has been agitating for regulators to loosen the handcuffs on the ability of banks to raise dividends and buy back stock.

The Fed uses the annual stress tests to give the markets a window into the health of the U.S. bank industry, and also determine if individual banks are strong enough to reduce their capital buffers.

Bank of America, the nation's second-largest bank, passed the Fed's test, but it did not ask for a dividend increase or to buy back shares. Last year, the Fed rejected the bank's request for a dividend hike, in a major embarrassment for Chief Executive Brian Moynihan.

FIRST OUT THE GATES

JPMorgan, in a surprise to markets, announced around 3 p.m. EDT (1900 GMT) that the Fed had given it permission to raise its dividend by 20 percent and spend as much as $12 billion buying back stock this year.

The news helped the U.S. stock market post its best day this year.

The Fed had been scheduled to release the test results after markets closed on Thursday. A person close to the situation, who was not authorized to speak on the record, said the Fed quietly shifted the release to 4:30 p.m. EDT (2030 GMT) on Tuesday after leaks about the tests came out Monday evening.

The person said that at noon on Tuesday, there was a miscommunication between JPMorgan and the Fed over the hour of JPMorgan's own release.

A senior Federal Reserve official told reporters that the timing of JPMorgan's announcement was the result of less-than-perfect communication, and that nobody at JPMorgan was at fault.

Regarding the outcome of the tests, the Fed official said the capital positions of U.S. banks has improved substantially in the last three years.

U.S. regulators first ran a stress test in 2009 in a bid to show markets during the financial crisis that banks' balance sheets were better than some thought.

The Fed took a tough line with the banks this year, and in a number of instances, the central bank's estimates of banks' losses under the hypothetical financial shock were larger than the firms' own, the Fed official said.

Frank Keating, president of the American Bankers Association, said the bank industry objects to stress tests under theoretical conditions that are worse than what occurred during the financial crisis.

It unjustifiably prohibits some institutions from paying dividends to shareholders and could potentially impair their ability to raise capital and make loans. That is an unnecessary and ill-timed consequence of these stress tests given the essential role of banks in our still-recovering economy, Keating said.

Citigroup did not dispute the Fed's decision and said it would submit a revised capital proposal later this year. Some analysts had expected Citigroup to win permission to raise its dividend to as much as 10 cents from a penny a share.

In one sign of its weakness, Citigroup had the second-highest total loan loss rate under the stress scenario, behind Capital One, the Fed said.

WINNERS AND LOSERS

The Fed released 82 pages of detailed information showing how the 19 banks fared under the hypothetical stress scenario.

The regulator left it to the banks themselves to reveal if they had received permission to boost dividends or buy back stock.

The Fed said Citigroup, Ally Financial and SunTrust fared worst under the hypothetical shock, and that their minimum Tier 1 common capital ratios would hit lows of 4.9 percent, 2.5 percent, and 4.8 percent respectively.

Banks that did not get the rulings they wanted saw their shares fall sharply after the market closed. Citigroup, for example, lost 3.5 percent in after-hours trading.

It was very surprising that JPMorgan can pretty much do what it wants while some of the other guys fail, said Paul Miller, an analyst at FBR Capital Markets. We were worried about anybody that was not making a lot of money, and this takes away a lot of any upside potential for SunTrust and Citi.

MetLife failed the stress tests on the basis of its risk-based capital ratio. At a 6 percent minimum, it was lower than any of the other banks examined.

The bank holding companies whose balance sheets weathered the hypothetical storm best were Bank of New York Mellon with a Tier 1 common capital ratio of 13.1 percent, State Street Corp with 12.5 percent and American Express with 10.8 percent.

Wells Fargo, U.S. Bancorp, BB&T, American Express, KeyCorp, PNC, Morgan Stanley, Goldman Sachs, Bank of New York Mellon said they had received permission to boost dividends or repurchase shares.

(Reporting by Jonathan Stempel in New York; Additional reporting by David Henry, Rick Rothacker, Ben Berkowitz, Alexandra Alper, Dave Clarke; Writing by Karey Wutkowski; Editing by Tim Dobbyn)