Correction: An earlier version of the headline of this article incorrectly said that Spanish banks had requested a bailout. The Spanish government requested international assistance that would go into a fund designated to help the banks. An earlier request by Spain for direct aid to banks was rejected. This version has been corrected.

Two and half years after the start of Europe’s debt crisis, Spain on Saturday became the fourth and by far the largest euro-zone nation to seek an international bailout, with financial leaders from the currency bloc declaring a deal that could inject as much $125 billion into the country’s ailing banks.

The humbling request — by a nation of 47 million that sought to fend off the embarrassment of a bailout for months — came as Madrid faced mounting international pressure to cave in and ask for cash. Global leaders, including President Obama and German Chancellor Angela Merkel, had strongly hinted in recent days that the risks of Spanish inaction were mounting, leading to fears that it could result in a full-blown financial crisis, endanger the euro currency union and spark a fresh bout of turmoil on global markets.

The lifeline for Spain also was seen as an essential buffer to calm investors ahead of a key vote in Greece on June 17. The elections there could bring to power a new government opposed to the terms of Greece’s bailout, potentially putting that nation’s future in the euro zone in question and becoming a trigger for an escalation of the region’s woes. By inoculating Spain with a bailout, European financial leaders were trying to limit the possible fallout.

In contrast to the near-broken economy of deeply indebted Greece, Spain’s problem is less about the mismanagement of government finances and more about the trials of Spanish banks. Its banking system has worsened in part because of Madrid’s failure to force an earlier cleanup of bad debts stemming from a U.S.-style real estate bust in 2008. Bank balance sheets have since deteriorated as waves of austerity demanded by European leaders as a remedy to the region’s debt crisis tipped more and more Spanish homeowners into foreclosure and Spanish businesses into bankruptcy.

Those problems came home to roost Saturday.

Economy Minister Luis de Guindos announced that his nation would request a bailout to recapitalize a group of ailing Spanish banks. In a bow to Spanish pride, however, de Guindos said the terms of the loan would be “very favorable,” structured much differently from those previously offered to Greece, Ireland and Portugal, leading some to dub it a “bailout lite.”

Spain had initially sought a direct injection of cash into its banks from a $625 billion European fund established to contain the debt crisis. Opponents, led by Germany, shot that idea down, saying nations, not banks, must be ultimately responsible for any money lent.

On Saturday, however, European financial officials agreed to funnel cash directly into a special Spanish government fund designed only for bank aid, offering the six-month-old government of Prime Minister Mariano Rajoy a face-saving compromise.

In addition, the European loan, de Guindos said, would not come with the humiliating independent oversight and demands for fresh government cuts required of Greece, Portugal and Ireland, partly because Spain had already agreed to strict new European Union budget targets. Spanish banks that receive aid, however, will be subject to European and possibly International Monetary Fund oversight.

That shade of difference led de Guindos to declare that the forthcoming lifeline should be seen as “financial assistance” and not “a rescue.” That did not stop the Spanish newspaper El Pais from running a banner headline on its Web site in apocalyptic type that declared: “Rescue for Spain.”

“The government and its partners have decided to make this announcement because it is good for the Spanish economy, and for the future of the euro zone,” de Guindos told reporters in Madrid.

Fund yet to be ratified

The move brought a wave of relief from both sides of the Atlantic.

“We welcome Spain’s action to recapitalize its banking system and the commitment by its European partners to provide support,” U.S. Treasury Secretary Timothy F. Geithner said Saturday. “These are 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.”

German Finance Minister Wolfgang Schaeuble said the Spanish decision was “to be welcomed.”

“Spain as a whole is well on its way, thanks to reforms it has set in motion,” he said in a statement, adding that he appreciated “the determination by the Spanish government to tackle the recapitalization.”

Yet underscoring the political and diplomatic land mines that have routinely plagued attempts to solve Europe’s crisis, he noted that the fund from which Spain is set to draw its rescue cash had not been fully ratified in Europe. In fact, even mighty Germany hasn’t officially signed off on it: Opposition parties have held up the process to extract more growth measures for Europe out of Merkel. Schaeuble urged quick action toward its passage.

De Guindos announced the request after intense rounds of financial diplomacy in two conference calls, including one linking finance ministers from the 17 nations that share the euro with officials in Brussels, the E.U. administrative capital.

In a statement, the Eurogroup — made up of the region’s finance ministers — offered a friendly reminder to Spain, noting that while the funds would go to aid Spanishbanks, ultimately “the Spanish government will retain the full responsibility of financial assistance.”

Amount to be determined

The exact amount of the loan, for which Spain still needs to make a formal application, has yet to be determined. But the figure of up to $125 billion was designed to cover what many view as the higher range of what Spain’s need may ultimately be.

“This scale of proposed financing . . . gives assurance that the financing needs of Spain’s banking system will be fully met,” said Christine Lagarde, managing director of the Washington-based International Monetary Fund.

Spanish and other European officials signaled their belief that Madrid would require less. An initial figure is expected in weeks, after independent audits of the banking system are completed.

In a key report released Friday — three days earlier than expected in a sign of the urgency of the situation — the IMF offered a mixed assessment of Spain’s banking system, which is made up of stable, global behemoths such as Banco Santander, Europe’s second-largest bank, as well as black holes such as Bankia, which said last month that it needed as much as $23 billion in recapitalization funds from the Spanish government.

The IMF estimated that the system needs at least $50 billion in additional capital to weather a deep economic downturn. But that amount is smaller than some private analysts have estimated.

The fund said a final tally of Spanish bank needs would depend on ongoing independents audits, and could be perhaps twice its estimate.

In contrast to past bailouts, the IMF will not be putting up cash. Many observers viewed an IMF contribution as politically untenable, given that Europe is an extremely wealthy region fully capable of footing the bill itself.

However, IMF staff were invited to “support” the E.U.’s monitoring of Spanish banks that end up receiving aid.

In an apparent castigation of Spain for dragging its feet, the IMF said “delays” in addressing Spain’s banking woes “could exacerbate the macroeconomic downturn, erode market confidence, and damage stability more broadly.”

Correspondent Michael Birnbaum in Athens contributed to this report.