MADRID – Europe is to offer Spain a bailout package of up to $125 billion to help rescue the country’s banks and keep the 17-country eurozone from breaking apart.

After months of fierce denials, Spain admitted it would tap the fund as it moved faster than expected to stem the economic crisis that has ravaged Europe for two years.

Spain becomes the fourth — and largest — European economy to ask for help and its admission of help comes after months of market concern about its ability to pay its way. In recent weeks, investors have demanded higher costs to lend to Spain, and it became clear it would be just too expensive for the country to borrow the money necessary for a bank rescue from the markets.

The three countries that have received rescues thus far — Greece, Ireland and Portugal — are fairly small, and many have worried that bailing out much-larger Spain could call the entire euro project into question. Cyprus, also a small economy, could be forced to seek a bailout soon.

Economy Minister Luis de Guindos said Saturday the aid will go only to the banking sector and so would not come with new austerity conditions attached for the economy in general — conditions that have been an integral part of bailouts to Portugal, Ireland and Greece.

A statement from the finance ministers of the 17 countries that use the euro explained that the money would be fed directly into a fund Spain set up to recapitalize its banks, but underscored that the Spanish government is ultimately responsible for the loan.

Still, that plan allows Spain to avoid making the onerous commitments that Greece, Ireland and Portugal were forced to make when they sought their rescues. 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 exact figure of the bailout, however, has not yet been decided. De Guindos said the country is waiting until independent audits of the country’s banking sector have been carried out before asking for a specific amount. The audits are expected by 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.” The eurogroup statement said that meant the cost could reach $125 billion. The aid package was announced after a video conference of eurozone finance ministers.

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.”

International pressure on Spain to solve its financial problems has been growing 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 Friday, Moody’s Investor Services warned it could downgrade Spain and other countries in the eurozone.

Early Saturday, the International Monetary Fund released a report estimating that Spanish banks need a recapitalization injection of at least $50 billion, following 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.