Media playback is unsupported on your device Media caption Luis de Guindos says Spain has agreed to officially request assistance, but denies this is a bailout

Spain is to get up to 100bn euros ($125bn; £80bn) in loans from eurozone funds to try to help shore up its struggling banks.

The move was agreed during emergency talks with eurozone finance ministers.

Spain's Economy Minister Luis de Guindos said his country would shortly make a formal request for assistance.

He emphasised that the help would be for the financial system, not the economy as a whole. "This is not a rescue," he said.

"This is a loan which is given in very favourable conditions, which will be determined in the next few days. But they are very favourable - much more favourable than the market ones," Mr de Guindos told a news conference.

The Spanish government had been reluctant to ask for a bailout like the one given to Greece, Ireland and Portugal, as these rescue packages came with demands for tax rises and stringent spending cuts.

Analysis Most analysts and experts would say this is a bailout. It is different to the bailouts of Greece and Portugal and Ireland: it's not going to have such strict conditions and the money is going to be directed via the Spanish government using Frob [Fund for Orderly Bank Restructuring] - which is essentially a bank restructuring fund that exists here in Spain. But it is a government institution, so the debt is going to be on the Spanish government's books. It is money that will be directed towards troubled Spanish banks, banks that lent heavily during the construction boom here - of course, the property market crashed and the loans turned bad. Up to the last moment, Spain was at least refusing comment, with some ministers at times denying that Spain was going to go for a bailout. The impression we get is that Spain has been led by the hand slightly and at least sped up in the process of asking for help from abroad.

Mr de Guindos said there would be conditions attached for the banks receiving the loans, but there would not be "micro-economic conditions" for Spain.

"We hope that as a result of these injections [of capital] families and companies will have more solvent banks which are able to offer them credit, which they are not able to do at the moment," he said.

'Unprecedented'

The exact amount that Spain will receive will be decided after the completion of two audits of its banks, due to be completed by the end of the month.

A team comprising staff from the European Commission, the European Central Bank and the International Monetary Fund will head to Madrid to assess the needs of the Spanish banking sector, a Eurogroup spokesman confirmed to the BBC.

The money will bolster the finances of Spain's weakest banks, which have been left with billions of euros worth of bad loans because of the collapse of the country's property boom and the recession that followed.

Some of them borrowed large amounts on the international markets to lend to developers and homebuyers, a riskier strategy than funding it with deposits from savings.

Crisis jargon buster Use the dropdown for easy-to-understand explanations of key financial terms: AAA-rating AAA-rating The best credit rating that can be given to a borrower's debts, indicating that the risk of borrowing defaulting is minuscule.

When the credit crunch hit, Spain's financial sector was plunged into what the IMF has described as an "unprecedented" crisis.

Banks need to offload some 200,000 repossessed properties at a time when house prices have fallen by 25% on average.

The government has already put 34bn euros into the banking system to try to strengthen it, according to the IMF. In addition, it has recently nationalised Bankia, its fourth largest bank, which last month requested 19bn euros.

Spain was keen to ensure that any external assistance went directly to its banks, rather than to the central government.

As a result, the loans will go to its bank restructuring agency, called Frob. But this would still be considered state debt, Mr de Guindos said.

The Eurogroup said "the Fund for Orderly Bank Restructuring, Frob, acting as agent of the Spanish government, could receive the funds and channel them to the financial institutions concerned. The Spanish government will retain the full responsibility of the financial assistance".

The money will come from two funds created to help eurozone members in financial distress. They are the European Financial Stability Facility (EFSF) and the European Stability Mechanism (ESM), which enters into force next month.

The European Commission welcomed the move.

"With this thorough restructuring of the banking sector, together with the on-going determined implementation of structural reforms and fiscal consolidation, we are certain that Spain can gradually regain the confidence of investors and market participants," Commission President Jose Manuel Barroso and Vice President Oli Rehn said in a statement .

Meanwhile, US Treasury Secretary Timothy Geithner described the developments as "important for the health of Spain's economy and as concrete steps on the path to financial union, which is vital to the resilience of the euro area".