Spain's decision to request a loan of up to €100 billion from the euro zone has won broad support.
The International Monetary Fund (IMF) said the bailout is big enough to restore credibility to Spain's banks.
The United States has welcomed the measure as a vital step towards the financial union of the euro zone.
The move was agreed during emergency talks between euro zone finance ministers.
IMF managing director Christine Lagarde said the plan for Spain should provide "assurance that the financing needs of Spain's banking system will be fully met".
"I strongly welcome the statement by the Eurogroup, which complements the measures taken by the Spanish authorities in recent weeks to strengthen the banking system," she said.
US Treasury Secretary Timothy Geithner welcomed the latest moves 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".
France's Finance Minister Pierre Moscovici said the deal would "contribute to restoring confidence in the euro zone".
European Commission president Jose Manuel Barroso said he was confident that through bank restructuring and other reforms, Spain could gradually regain the confidence of investors and create the conditions needed for sustainable growth and job creation.
'Margin of security'
Spain's Economy Minister Luis de Guindos earlier said the loans will be for the financial system, not the economy as a whole, and stressed it was not a rescue package.
He said the amount of the rescue was more than enough and would provide a margin of security that no one could question.
He said the loan is not on the same scale as the bailouts of the Greek and Irish governments.
"What we are doing is asking for a loan to be able to have financial entities which are more solvent and which can offer credit," Mr de Guindos told a news conference.
"It is very difficult to have an economic recovery if there are doubts about the level of solvency of capital."
Officials said there had been a heated debate over the International Monetary Fund's role in Spain's bank rescue, which Madrid wanted kept to a minimum, Reuters reports. The IMF will not provide any of the money.
Mr de Guindos said it was not yet clear which European bailout structure would be used to give out the funds, the European Financial Stability Facility (EFSF) or the European Stability Mechanism.
While saying it wants help for its banks, Madrid will not specify the precise amount it will borrow until two independent consultancies deliver their assessment of the banking sector's capital needs, some time before 21 June.
Spain had been urged by Brussels and Germany to act before the 17 June elections in Greece, where political turmoil has led to fears of a break-up of the euro zone.
With the rescue of Greece, Ireland, Portugal and now Spain, the EU and IMF have committed around €500 billion to finance European bailouts.