Bank of America Corp posted an unexpectedly sharp decline in first-quarter profit, plagued by losses in the mortgage business, and the bank named a new chief financial officer.

The largest U.S. bank lost more than $2.39 billion in its home loan business as revenue fell and expenses rose. A settlement with a bond insurer over mortgage bonds gone bad cost it $1.6 billion.

The results give some inkling of why the Federal Reserve told the bank in March to rein in its plans to boost dividends, even as competitors were authorized to hike their payouts.

Bank of America is struggling with the mortgage mess and cleaning up what is going on there, said David Morrison, market strategist at FT Global Markets in London.

The bank did manage to earn $2 billion in the quarter, its first profit since the second quarter of 2010. Bank of America faced big mortgage and card-related losses throughout the second half of last year.

Net income was $2.0 billion, or 17 cents per share, down from $3.2 billion, or 28 cents per share, in the same quarter a year ago.

Analysts on average had forecast earnings of 27 cents a share, according to Thomson Reuters IBEX.

The loss in its residential mortgage unit of more than $2.39 billion compared with a loss of $2.07 billion a year earlier.

The bank said Bruce Thompson, chief risk officer, will also take on the role of chief financial officer at the end of the second quarter. Chuck Noski, current CFO, will become vice chairman of Bank of America.

The bank's shares were little changed in premarket trading.

(Reporting by Joe Rauch, additional reporting by Dan Wilchins in New York; editing by John Wallace)