(Bloomberg News) Bank of America Corp., the biggest U.S. lender, said Warren Buffett's Berkshire Hathaway Inc. will invest $5 billion to bolster the company after losses tied to subprime mortgages drained capital. Bank of America surged in New York trading.

Berkshire will get cumulative perpetual preferred stock paying a 6 percent dividend, the Charlotte, North Carolina-based bank said today in a statement. Omaha, Nebraska-based Berkshire also gets warrants to buy 700 million shares at $7.14 each.

The deal aids Bank of America Chief Executive Officer Brian T. Moynihan, 51, who is cutting jobs and selling assets to help restore investors' confidence. Bank of America lost almost half its value on the New York Stock Exchange this year through yesterday as investors speculated the lender would have to access the public markets to raise capital.

"This is a tremendous vote of confidence in the U.S. banking industry as well as Bank of America," said Anthony Polini, an analyst with Raymond James Financial Inc. "Bank of America was being punished or victimized as one of the weakest U.S. banks that could be in financial distress. For Buffett to step up like this for BofA has implications for all the other banks."

The lender jumped $1.03, or 15 percent, to $8.02 in New York Stock Exchange composite trading at 10:25 a.m., leading the KBW Bank Index higher. Berkshire fell less than 0.1 percent.

'Acting Aggressively'

Buffett conceived of the investment while in the bathtub yesterday morning and had his assistant contact Moynihan's to get the banker's private number, CNBC reported, citing an interview with Buffett.

"Bank of America is a strong, well-led company, and I called Brian to tell him I wanted to invest," Buffett said in the statement. "I am impressed with the profit-generating abilities of this franchise, and that they are acting aggressively to put their challenges behind them."

Berkshire's warrants may be exercised at any time in a 10- year period, according to the statement. Bank of America can redeem the preferred stock at any time for a 5 percent premium.

Buffett helped prop up Goldman Sachs Group Inc. during the credit crisis in 2008 with a $5 billion investment that was repaid this year. The Goldman Sachs investment paid a 10 percent dividend. Berkshire is the largest stock investor in Wells Fargo & Co., the only U.S. home lender larger than Bank of America.