MADRID (MarketWatch) — Spain became the fourth euro-zone country to require international financial assistance on Saturday, as Finance Minister Luis de Guindos said the country will ask the European Union for as much as 100 billion euros ($125 billion) in loans to help its struggling banking sector.

Speaking to reporters Saturday evening following a teleconference call with euro-zone finance ministers earlier in the day, a visibly tense de Guindos said the loans were specifically aimed at the banking sector and not the wider economy.

The loans would be given under “very favorable” conditions and there were no specific economic preconditions, he said.

“The Eurogroup supports the efforts of the Spanish authorities to resolutely address the restructuring of its financial sector and it welcomes their intention to seek financial assistance from euro area member states to this effect,” said the Eurogroup in a statement.

The assistance will be provided by the European Financial Stability Facility /European Stability Mechanism.

The Eurogroup said the loan will be an “effective backstop covering for all possible capital requirements estimated by the diagnostic exercise which the Spanish authorities have commissioned to the external evaluators and the international auditors.”

The Fund for Orderly Bank Restructuring, Spain’s bank bailout fund, will act as an agent for the Spanish government, receiving the funds and channeling them to financial institutions in need.

The announcement ends days of speculation that Spain would be forced to ask Europe for bailout help for its banks, which are struggling under the weight of a collapsed housing market and the recession that has followed.

Spain’s borrowing costs have moved sharply higher since April. Treasury Minister Cristobal Montoro recently said the country has been “shut out” of capital markets.

Removing doubts

Europe's Week Ahead: Elections and Chinese data

De Guindos on Saturday said the markets were living in times of “great tension,” but he was confident the assistance for the banks will remove market doubts about Spain’s banks.

He noted it’s “extremely difficult” for an economy to recuperate if there are doubts about the solvency of its banks, as they can’t give loans to households and small businesses under such conditions.

De Guindos said a report from International Monetary Fund on Spanish banks indicated that the needs of the institutions are “manageable.”

Releasing its Financial Sector Assessment Program three days early on Friday, the IMF said Spain’s banks would need €40 billion ($50 million) to meet international standards in the event of economic shocks. Its stress tests found that while Spain’s largest banks would be sufficiently capitalized, other parts of the sector needed to ramp up capital.

Spain’s government is also awaiting results of an independent audit of the banks, due June 21.

IMF Managing Director Christine Lagarde on Saturday welcomed Spain's request for assistance.

The arrangement is a “crucial step for the success of the Spanish authorities’ strategy” to strengthen the country’s banking system, said Lagarde in a statement.

The size of the funding “gives assurance that the financing needs of Spain’s banking system will be fully met,” she added, noting that the IMF is ready to help the implementation and monitoring of the assistance.

Worries about Spain have created weeks of turmoil for markets, with the Iberian nation’s problem adding a troubling new layer to concerns already created by Greece, with voters due to go to the polls next weekend.

Analysts said markets have largely priced in the possibility of Greece’s pro-austerity parties losing the election. But the potential for a Greek exit is something markets are still trying to grasp.

Alarming development

It remains to be seen how markets will react to the Spain bailout news, even though most market watchers were convinced it would happen.

Nicholas Spiro, managing director of Spiro Sovereign Strategy, said Spain’s request is “the most significant and alarming development” of the European crisis.

“One of the two southern European economies that matter most to the future of the euro zone, and the bloc’s fourth-largest, is no longer capable of managing its own financial affairs,” said Spiro in emailed comments.

“Two years after Greece went bankrupt, Spain is now flirting with insolvency ... Market reaction is unlikely to be favorable given that the bailout places even more strain on Spain’s creditworthiness.”

European stock markets ended the week higher, with the Stoxx Europe 600 index (SXXP) ending 2.9% up, its best weekly performance since early February.

The Spain IBEX 35 index (IBEX) rallied 1.8% on Friday as the market shook off a prior-day downgrade of the country’s sovereign debt rating by Fitch Ratings to focus on a potential rescue plan this weekend for the banks. The yield on the 10-year Spanish bond (10YR_ESP) rose 17.4 basis points to 6.25% late Friday, according to Tradeweb.

Wall Street stocks also saw their best week for the year so far, inspired by hopes that Spain would ask and receive a lifeline for its banks from Europe.