Bank of America story updated to include new details on mortgage-related settlements in paragraphs 9 and 11-13.

NEW YORK (

TheStreet

) --

Bank of America

(BAC) - Get Report

's fourth quarter earnings report showed the bank continuing to wrestle with mortgage-related headaches.

At first take things look good. Bank of America's mortgage banking unit earned $2.12 billion, versus an estimate of a $1.44 billion profit from Sandler O'Neill analyst Jeffrey Harte. That compares to a $1.62 billion profit in the third quarter and a $1.42 billion loss in the fourth quarter.

But a closer look shows the bank recorded a $1.5 billion mortgage related litigation expense and set aside another $263 million for so-called representations and warranties--relating to investor challenges to mortgage bonds the bank sold leading up to the crisis. It said the $263 million figure was primarily related to government-sponsored entities

Fannie Mae

(FNMA.OB)

and

Freddie Mac

(FMCC)

, and compared that number with "selected items of $918 million" in the third quarter.

Mortgage-related risk has been the overriding concern for Bank of America shareholders pretty much ever since the 2008 crisis. The issue really came to the fore, however, in late 2010, when it became clear that the bank was facing tens of billions in exposure to litigation related to mortgages underwritten by Countrywide Financial, which the bank bought in 2008.

A recent

analysis

by Citigroup analyst Keith Horowitz found that the bank may require as much as $32 billion in additional capital to cover mortgage-related legal costs, despite having set aside $37 billion so far through recognized losses and reserves.

In perhaps the most closely-watched case, Bank of America has reached a deal to settle for $8.5 billion in claims by several giant institutions, including

BlackRock Financial

(BLK) - Get Report

,

Pimco

and

Goldman Sachs

(GS) - Get Report

, which bought bonds backed by mortgages that were fraudulent or in some way did not live up to the promises made at the time the bonds were sold.

New York attorney general Eric Schneiderman has opposed the deal, arguing bondholder trustee

BNY Mellon

(BK) - Get Report

stood to benefit financially by signing off on a deal that did not punish Bank of America to severely. BNY Mellon has vehemently denied those allegations.

Whether that settlement gets approved is crucial, since many analyst estimates of Bank of America's likely total exposure to mortgage litigation use the deal as a benchmark.

Also up in the air are agreements between Bank of America and government-sponsored mortgage giants Fannie Mae and Freddie Mac. While Bank of America was making progress in reaching settlements with Fannie and Freddie, Steve Linick, inspector general of the Federal Housing Finance Authority, which oversees the mortgage giants, argued in a report last year the FHFA was too quick to sign off on at least one of those deals, a $1.35 billion settlement with Freddie Mac. Since then, Bank of America highlighted "disagreements" in talks with Fannie and Freddie in the third quarter, and Bank of America CFO Bruce Thompson said Thursday there has been "no change on that perspective."

There is also the question of the expected $25 billion settlement between attorneys generals in various states and Bank of America,

Ally Financial

,

JPMorgan Chase

(JPM) - Get Report

,

Wells Fargo

(WFC) - Get Report

,

Citigroup

(C) - Get Report

, and a few other banks over mortgage servicing foul-ups. Attorneys generals in some key states, including New York, Delaware and Massachusetts, have said they won't agree to a deal that would prevent them from pursuing ongoing investigations into other mortgage-related issues.

The Wall Street Journal

reported Wednesday that a deal with the five banks mentioned above is imminent, citing statements by Housing and Urban Development Secretary Shaun Donovan at a conference of mayors. The report states the "banks, state attorneys general and Obama administration officials are pushing a deal of $19 billion or more, depending on how many states join the settlement."

Thompson said part of the $1.5 billion litigation expense came from an expectation of "what we think the deal may be," with the attorneys general, though he implied this expectation came from reading the newspaper.

"You read what we read," Thompson said.

The rest of the $1.5 billion expense is attributable to a "fair lending settlement," involving Countrywide Financial. He appears to be referring to the $335 million the bank will pay to settle a probe by the U.S. Justice Department into

alleged discriminatory lending practices

by Countrywide.

--

Written by Dan Freed in New York

.

Disclosure: TheStreet's editorial policy prohibits staff editors, reporters and analysts from holding positions in any individual stocks.