Bank of America Corp reported higher-than-expected first-quarter earnings on Friday as it set aside less money to cover bad loans.

The largest U.S. bank by assets said net income increased to $2.83 billion, or 28 cents per share, from $2.81 billion, or 44 cents per share, a year earlier.

Analysts on average had forecast a profit of 9 cents per share, according Thomson Reuters I/B/E/S.

With each day that passes, the 2010 story appears to be one of continuing credit recovery, and our results reflect a gradually improving economy, Chief Executive Brian Moynihan said in the earnings announcement.

Consumer credit problems caused the bank to report losses in the third and fourth quarters of 2009, when large U.S. banks were dealing with the fallout from the global financial crisis.

Bank of America's first-quarter per-share earnings were lower because of an increase in shares outstanding. The bank sold shares in the 2009 fourth quarter to raise funds to repay a government bailout.

First-quarter revenue fell 11 percent to $32.3 billion. Five of the bank's six major business units were profitable during the quarter.

Like JPMorgan Chase & Co -- which beat earnings expectations on Wednesday with a $3.3 billion profit -- Bank of America benefited from a booming investment banking unit.

Its global banking and markets division reported net income of $3.2 billion, up $709 million from a year earlier, on record sales and trading revenue.

The bank's provision for credit losses decreased by $3.6 billion, to $9.8 billion.

The bank ended the quarter with $2.3 trillion in assets and $976 billion in loans and leases, little changed from a year earlier.

Bank of America shares were up 2.6 percent at $19.98 in premarket trading. At Thursday's close, the shares had risen 29 percent this year, compared with a 34 percent rise in the KBW Bank Index <.BKX>.

(Reporting by Joe Rauch; Editing by John Wallace)