(Corrects global markets unit net income in 8th paragraph to $1.2 billion from $4.8 billion)

CHARLOTTE, North Carolina - Bank of America Corp reported a wider-than-expected quarterly loss, hurt by still-high loan losses and its repayment of U.S. government bailout aid.

But the nation's largest bank said its credit problems are beginning to stabilize. Its fourth-quarter provision for credit losses was $10.1 billion, down 14 percent from the third quarter.

I would describe the outlook statement as cautiously optimistic, said Neil Smith, an analyst at WestLB. It could have been worse. They key phrase is, 'We have seen stabilization of our credit costs.' That's got to be good for the consumer business.

Bank of America said its quarterly loss $5.2 billion, or 60 cents per share, compared with a year-earlier loss of $2.4 billion, or 48 cents a share. Analysts' average forecast was a loss of 52 cents per share, according to Thomson Reuters I/B/E/S.

The report -- along with similar earnings reports from other major U.S. banks -- signals the long, gradual recovery of the U.S. economy from the recession and financial crisis, analysts said.

U.S. Bancorp also reported fourth-quarter results on Wednesday, posting a $602 million profit on higher fee income.

Bank of America's quarterly revenue jumped 59 percent to $25.4 billion, primarily due to the addition of Merrill Lynch & Co.

Net income in its global markets unit was $1.2 billion, compared with a net loss of $3.7 billion a year earlier. The bank cited a more favorable trading environment and the addition of Merrill.

The Merrill acquisition also bolstered the global wealth and investment management unit, which saw net income rise by $816 million to $1.3 billion.

For the full year 2009, Bank of America posted net income of $6.3 billion, compared with $4 billion in 2008 during the height of the financial crisis.

In early December, Charlotte, North Carolina-based Bank of America repaid $45 billion in Troubled Asset Relief Program funds, leading a wave of bailout repayments by the country's biggest banks.

Bank of America said the repayment resulted in a $4 billion one-time charge in the fourth quarter. The charge totaled $5.022 billion including preferred stock dividends.

Excluding the one-time charges, the bank posted a quarterly loss of $194 million.

Nonperforming assets -- the full range of delinquent and defaulted loans -- totaled $35.7 billion at the end of the fourth quarter, up 5.6 percent from the end of the third quarter.

Bank of America shares were up 8 cents to $16.40 in premarket trading.

(Reporting by Joe Rauch; editing by John Wallace)