MILAN (Reuters) - Intesa Sanpaolo (>> Intesa Sanpaolo SpA), Italy's biggest retail bank, posted a 10 billion euro ($13.07 billion) loss in the fourth quarter as it joined domestic rival UniCredit in writing down billions of euros of goodwill to repair a balance sheet damaged by the euro zone debt crisis.

The lender said in its results statement that it will have to revise its business plan targets because of market turmoil and amid expectations the Italian economy could shrink as much as 2.2 percent this year.

"We do not know what lies ahead but we are well prepared if we hit strong headwinds," Chief Executive Enrico Cucchiani told analysts in a conference call on Wednesday.

Intesa said it had carried out a "highly prudent impairment" on the goodwill of past deals.

It gave no details of the writedowns of around 10 billion euros but analysts said they related to the all-Italian merger that created the bank in 2007 -- worth $37 billion at the time -- and to its purchase of Carifirenze.

The writedowns do not impact the bank's capital, liquidity and cash flow and its shares rallied on relief that Intesa had cleaned up its accounts, drawing a line under the most acute phase of the debt crisis that hit Italian lenders hard.

The stock lost ground immediately after the results but was up 1.2 percent at 1.52 euros at 1522 GMT, outperforming a 0.2 percent fall in the broad European DJ STOXX banking index <.SX7P>.

"Core results are good, there no extraordinary items. All in all the bank is well positioned now," one trader said.

Despite the big loss, Intesa said it would pay a dividend of 0.05 euros for the year, down from 0.08 euros in 2010. The Core Tier 1 ratio, adjusted to the European Banking Authority's requirements, stood at 9.2 percent after the dividend.

Intesa, which appointed a new chief executive in November last year, is the only top Italian bank that does not have a capital shortfall to meet the EBA requirements.

However the lender is vulnerable to a further weakening of the Italian economy, which is in a recession, as it gets 80 percent of its revenues from its domestic hub.

The bank also has the biggest exposure to Italian government bonds among the country's lenders with around 60 billion euros, slightly down from the end of September.

Cucchiani, the former head of German insurer Allianz in Italy, replaced Corrado Passera at the helm of Intesa after Passera joined Italy's new government as industry minister.

In an effort to trim costs and bolster its balance sheet, it has announced plans to cut 5,000 jobs by the end of 2013 to trim costs and last month sold 1.6 billion euros of non-performing loans.

Intesa was Italy's first bank to return to the wholesale debt market after an eight-month funding freeze due to the debt crisis, issuing a senior unsecured 1.5 billion euros bond in January.

However, it has also taken up 36 billion euros of cheap three-year funds offered by the European Central Bank in December and February, more than any other Italian bank.

(Editing by David Cowell)

By Silvia Aloisi

Stocks treated in this article : UniCredit SpA, Intesa Sanpaolo SpA