"What the markets are looking for is essentially the Spanish government's acceptance that its banks are broke," said Jacob Kirkegaard, a research fellow at the Peterson Institute for International Economics in Washington.
Economy Minister Luis de Guindos announced the deal after an emergency conference call with eurozone financial leaders. He said the aid would go to the banking sector only and would not come with new austerity conditions attached for the economy in general - conditions that have been an integral part of bailouts for Portugal, Ireland, and Greece.
The exact figure of the bailout had not yet been decided. De Guindos said the country would await independent audits of its banking sector before asking for a specific amount. The audits are expected June 21 at the latest.
De Guindos did say, however, that Spain would request enough money for recapitalization, plus a safety margin that will be "significant."
With markets in turmoil, de Guindos said the government's efforts to shore up the financial sector "must be completed with the necessary resources to finance the needs of recapitalization."
Finance ministers of the 17 countries that use the euro said the money would be fed directly into a fund Spain set up to recapitalize its banks, but underscored that the Spanish government was ultimately responsible for the loan.
Still, that plan allows Spain to avoid making the onerous commitments that Greece, Ireland, and Portugal were forced to when they sought rescue. Instead, the eurogroup statement said that it expected Spain's banking sector to implement reforms and that Spain would be held to its previous commitments to reform its labor market and manage its deficit.
The eurogroup statement said that meant the cost could reach $125 billion.
Spain's acceptance of aid for its banks is a big embarrassment for Prime Minister Mariano Rajoy, who insisted just 10 days ago the banking sector would not need a bailout. He was elected in November and walked right into a hurricane.
International pressure on Spain to solve its financial problems had grown more urgent in recent weeks. On Thursday, ratings agency Fitch hit Spain with a three-notch downgrade of its credit rating. That left it two levels above junk status. Then on Friday, Moody's Investor Services warned it could downgrade Spain and other countries in the eurozone.
The International Monetary Fund released a report early Saturday estimating that Spanish banks needed a recapitalization injection of at least $50 billion after a stress test it performed on the country's financial sector. That report came out three days ahead of schedule, underscoring the urgency of the situation.