* Spain says will need around 40 bln euros for banks
* Banking audit reveals 59 bln euros capital need
* Banks will be able to raise 19 bln euros on their own
* Bulk of funding needs lies with state-intervened banks
By Jesús Aguado and Sonya Dowsett
MADRID, Sept 28 (Reuters) - Spanish banks will need a total of 59.3 billion euros ($76.3 billion) in extra capital to ride out a serious economic downturn, an independent report said on Friday, removing a major obstacle in the way of an international bailout for Madrid.
Spain said around 40 billion euros of the total will come as European aid while the rest could be raised by the banks themselves.
The audit, carried out by consultant Oliver Wyman, is a condition of getting European funds to patch up Spanish banks damaged by a prolonged real estate crash, and identifies which banks need more capital and precisely how much each requires.
Spain has agreed a credit line that could provide up to 100 billion euros in European Union rescue funds for its banks.
"The preliminary estimate of the final amount we would need to tap from the 100 billion euro lifeline would be one third less than the capital shortfall identified by Oliver Wyman," Bank of Spain Deputy Governor Fernando Restoy said at a press conference.
Both the strict 2013 budget presented by the government of Prime Minister mariano Rajoy on Thursday and the audit of 90 percent of Spain's banking system are necessary steps for Madrid to request sovereign aid and trigger a European Central Bank bond-buying programme.
The "adverse economic scenario" the audit was based on is fast becoming reality in Spain as spending cuts and tax hikes throttle any recovery in the euro zone's fourth largest economy, driving up unemployment and prompting growing unrest.
Spain has replaced Greece, Ireland and Portugal as the main threat to the survival of the euro currency project.
The audit results were in line with market expectations and were applauded by the European Commission, the European Central Bank and the International Monetary Fund.
"That's another layer of uncertainty that's off the table," said David Schnautz, rate strategist at Commerzbank. "We got the budget yesterday and today the stress tests and now we're all keen to hear what the ratings agencies' view will be."
Credit rating agency Moody's is due to review Spain's debt grade before Monday. It currently has Spain on one notch above junk with a negative outlook.
The audit identified the bulk of capital needs at the four banks which have already been rescued by the Spanish government.
The worst case is Bankia, the result of an ill-fated, seven-way merger between unlisted savings banks which was taken over by the government earlier this year.
The capital shortfall for these banks is 49 billion euros, with Bankia accounting for half of that. The European Commission said the exact aid needed for each bank would be determined in the coming months.
More than 60 percent of the system, including heavyweights Santander, BBVA and Caixabank, did not need extra capital under the terms of the audit.
The total figure for the capital needs in the banking system falls to 53.7 billion euros from 59.3 billion when taking into account the effects of tax breaks and cost savings from pending mergers, the Bank of Spain said.
"SHOULD DISPEL ALL DOUBTS"
"The exercise has been very strict, very conservative and very transparent and therefore should dispel all doubts about the strength of the system," Secretary of State for the Economy Fernando Jimenez Latorre said.
Other banks that will need extra capital under the stressed scenario are Banco Popular, Banco Mare Nostrum and a new entity due to be formed by a merger between former savings banks Ibercaja, Liberbank and Caja 3.
These banks will next month present plans to the Bank of Spain outlining how they intend to raise capital by their own means including share placements, asset sales and forced losses on subordinated bondholders.
This could shave millions of euros off their final requirements and reduce the amount Madrid finally taps from the credit line agreed with Brussels in June.
The audit is also a precursor to the setting up of a "bad bank", aimed at siphoning off the foreclosed property and unrecoverable loans to developers that have weighed on lenders' balance sheets since a 2008 property crash.
Spain is suffering its worst credit crunch in 50 years and designers of the bank bailout hope these steps will lead to a resurgence of lending to families and businesses.