(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.

'Plenty Profitable'

Banking can "still be plenty profitable," Buffett told Bloomberg Television's Betty Liu on the "In the Loop" program on July 8.

The cost to protect against a default by Bank of America plunged. Credit-default swaps on the bank, which surged to a record this week, dropped 65 basis points to 308 basis points as of 10:43 a.m. in New York, according to data provider CMA.

Bank of America's trading floor in New York erupted in cheers and applause when the news was announced this morning, said a person at the company who witnessed the reaction but who wasn't authorized to speak publicly.

Moynihan agreed to sell the bank's Canadian card unit, with about $8.6 billion in loan balances, and plans to leave the U.K. and Irish card markets, Bank of America said this month. The bank has been forced to write down credit-card and mortgage units acquired by Moynihan's predecessor, Kenneth D. Lewis. Bank of America has sold more than 20 assets or units since Moynihan took over last year.

Job Cuts

The bank will eliminate about 3,500 jobs this quarter to focus "on what we can control" amid market turmoil, Moynihan said last week. Some workers already were informed of the dismissals, which are in addition to 2,500 reductions made this year, Moynihan said in a memo to senior managers.

Berkshire sold a stake in Bank of America last year and Buffett has publicly criticized Lewis, for missteps including the purchase of Merrill Lynch & Co., a deal struck the same day Lehman Brothers Holdings Inc. filed for bankruptcy in 2008.

Lewis "paid a crazy price, in my view," Buffett said in remarks released Feb. 10 by the Financial Crisis Inquiry Commission. "He could have bought them the next day for nothing." Moynihan became CEO early last year.

While the company suffered from errors, its reach among consumers are a source of strength, Buffett told CNBC in 2009.

"One thing about Bank of America," Buffett said. "It has a wonderful deposit-gathering system."