Eurozone finance ministers have agreed to lend Spain up to $125 billion to shore up its failing banks.
Ministers of 17 countries that use the common currency made the decision Saturday after heated debate.
Economy Minister Luis de Guindos announced earlier in the day that the Spanish government is asking for European financial help to recapitalize its banks.
He said the deal imposed no conditions on the overall Spanish economy, and no new austerity measures.
The exact loan amount will be determined once independent audits are completed later this month.
Spain has long rejected reports that it would need bailout loans like Greece, Ireland and Portugal. But Prime Minister Mariano Rajoy's conservative government had to bow to rising pressure from the markets, which have sent its borrowing costs soaring.
German Finance Minister Wolfgang Schaeuble hailed the deal for Spain as a signal of European solidarity.
"The message to Spain is the same as to everyone else. We all stand together in solidarity," he said. " Everybody has to solve their problems. We have the necessary instruments. They are available, but the conditions are that the problems being faced by those particular countries are then dealt with. All in all, regarding its financial and economic policies, Spain is doing the right thing but the banking sector in Spain needs an increased extra injection of capital and at the moment Spain - in light of the increased interest rates, cannot afford this.''
U.S. Treasury Secretary Timothy Geithner said the United States welcomes the deal. The administration is worried that the eurozone crisis could drag the U.S. economy down in an election year and has urged its leaders to stabilize the common currency.
Eurozone ministers said they were confident Spain would honor commitments to cut the deficit and restructure the economy, but that progress would be closely monitored.
Policymakers hope the rescue will satisfy financial markets and secure Spain ahead of the Greek elections June 17, which could lead to a destabilizing exit from the euro zone.