Spain, belatedly recognizing the effects of the 2008 property crash, has forced banks to write down 80 billion euros ($98.4 billion) of losses on bad property investments by the end of the year.

The country has also asked Europe for a credit lifeline of up to 100 billion euros to patch up losses in its banking system stemming from the housing collapse and exacerbated by a severe economic downturn.

CaixaBank, Spain's third-biggest bank, reported first-half net profit down 80 percent year on year, at 166 million euros, after taking 2.7 billion euros in writedowns. It needs to set aside a further 1.8 billion euros by the end of the year.

Tier 1 capital, as calculated by the European Banking Authority, was 11.1 percent, well above the 9 percent minimum level, while its liquidity buffer climbed to 40 billion euros.

The Catalonia-based lender was one of three banks, alongside Santander and BBVA, judged by an independent audit in June not to need rescue funds, even in a stressed scenario of a 6.5 percent fall in Spanish economic activity and house prices dropping 60 percent from their peak.

Mid-sized Banco Popular reported first-half net profit down 42.5 percent to 176 million euros and reiterated that it had no need for state aid.

The bank said it did not expect additional capital needs after a second wide-ranging independent audit being carried out on Spanish banks, the results of which are expected in September or October and will help to determine which lenders will receive European aid.

GAINING CLIENTS

Banco Popular, with heavy exposure to the collapsed property sector, took 1.5 billion euros in provisions, leaving it needing a further 5.1 billion euros of writedowns by the end of 2013.

It said that its business plan for 2012 and 2013, which includes a total of 11 billion euros in provisions, would enable it to make a net profit of 325-360 million euros in 2012, 580-654 million euros in 2013 and 1.4 billion euros in 2014.

The bank said its Tier 1 capital was 10.3 percent and that it had a liquidity buffer of 10 billion euros.

Banco Popular's stock rose 2.7 percent, extending Thursday's gains, while CaixaBank shares were little changed.

Spanish banking stocks surged higher on Thursday, with sector leaders Santander and BBVA up by more than 10 percent, after the European Central Bank President Mario Draghi said that it will do whatever it takes to save the euro.

The health of Spanish banks and the state are tightly interwoven, given lenders' high holdings of public debt. Both CaixaBank and Banco Popular said they had not increased their holdings of sovereign debt and that they were gaining clients as Spaniards, worried about the state of their lenders, tended to move their savings to bigger, stronger banks.

However, both banks also reported a year-on-year increase in bad loans as a percentage of total loans, as customers of Spanish banks continue to default on debt payments in a shrinking economy blighted by the highest unemployment rate in the European Union.

Spain's unemployment rate hit its highest since 1976 in the second quarter, data showed on Friday.

Santander, Spain's biggest bank, reported a halving of first half net profit on Thursday after it wrote down 2.7 billion euros in losses against foreclosed property and souring loans to housebuilders.

Its majority-owned subsidiary Banesto on Friday reported net profit of 34.6 million euros, down 88 percent, after making 663 million euros of writedowns on toxic real estate.

Fellow Spanish banks Bankinter and Sabadell have also reported first-half profits brought low by property writedowns.

BBVA is due to report first-half results on Tuesday.

(Editing by Julien Toyer and David Goodman)

By Sonya Dowsett and Jesús Aguado