The first planks in a dramatic bailout for Spain will be bolted together this weekend, with a final figure on the size of the rescue package to be ready within a week, according to sources in Brussels and Madrid.

The moves towards bailing out the finance sector of the eurozone's fourth biggest economy reflect a growing consensus that a Spanish collapse must be averted to prevent a devastating chain reaction that could bring down Italy and destroy the single currency. There were fears that this would spark a global downturn extending to the US and China, and both countries urged Europe to move swiftly to fix its long-running debt crisis.

President Barack Obama called on European leaders on Friday to strengthen their banks and urged Greece to remain in the eurozone. "There is a path out of this challenge," Obama told reporters at the White House. "These decisions are in the hands of Europe's leaders; they understand the urgent need to act. There are specific steps they can take right now to prevent the situation from getting worse. One of those steps is taking clear action as soon as possible to inject capital into weak banks."

With fears that Greek voters may add further fuel to the fire by electing a government that will lead them out of the euro on 17 June, Spain hopes to have a final figure ready by next Friday, sources in Madrid said.

Senior finance officials from around Europe are due to start drawing up detailed plans this weekend on how to shore up Spain's banks in a so-called "bailout lite" that would be smaller and less onerous than those of Portugal, Greece or Ireland. Spain must formally request help and last night Vitor Constancio, vice-president of the European Central Bank, told Portuguese radio that Spain was expected to do so "soon", according to Reuters.

Prime minister Mariano Rajoy's conservative government insists that a full and final figure on its needs can only follow independent valuations of the country's banking assets. The deadline for delivery of those estimates is 21 June, when eurozone finance ministers are due to meet, but the Spanish government is pressing auditors to provide them by the end of the week.

"No decisions have been made," Spain's deputy prime minister, Soraya Sáenz de Santamaría, said . "The government will declare its position once it knows the estimates."

A first indication would come by Monday, she said, with an International Monetary Fund report on Spain. That is expected to say that Spanish banks need a capital injection of €40bn (£32bn) and may be considered sufficient for a preliminary bailout request over the weekend, especially as the government has already seen the figures.

It remained unclear, however, when an announcement would come and how detailed it would be.

A Spanish bailout will almost certainly be targeted directly at its banks, avoiding a wider crisis that could prevent Spain borrowing on the markets to fund government spending.

Payment would probably be made by the European Financial Stability Facility to Spain's bank restructuring fund, known as the Frob. Speculation about the amount needed varies wildly. Three former savings banks, including the recently nationalised Bankia, have already asked for €28bn.

Spain's senior banker, Santander boss Emilio Botin, has said €40bn would be enough, but a second recession in three years will inflict further damage on a banking system already struggling to digest vast amounts of toxic real estate left over from a burst housing bubble.

The ratings agency Fitch estimates Spain's banks need additional capital of between €50bn and €100bn, though part of this could be covered by the banks themselves, with stronger banks such as Santander and BBVA avoiding state aid. Neighbouring Portugal, which has a much smaller economy, accepted a €78bn euro bailout.

It would be the first time that a mechanism aimed directly at a national bank restructuring fund has been used and it was unclear what European officials would demand in return.

Experts said Rajoy's attempts to wriggle out of external control of Spain's economy were doomed to failure. "The terms and conditions are going to want to see a clear path to restore growth and structural budget balance. That will include structural reforms and fiscal measures," said Luis Garicano, of the London School of Economics. "But I guess they will try to find a face-saving way of doing this."

"There will have to be conditions, otherwise what will the Germans say to their voters?" said Santiago Carbó, of Granada University. "They won't be as detailed as for Greece or Portugal, but they won't just be about restructuring the financial sector."

Pension reforms, increases in sales tax, a pruning of Spain's three million-strong civil service and further pressure on the government to slash its deficit with austerity measures could be on the list of demands. Concerns about the people running Spain's former savings banks, whose loans to property developers and speculators have poisoned the whole financial system, may also see demands that political appointees be removed from boards.

Spaniards are deeply pro-European and were not thought likely to turn their rage against the EU despite the prospect of even more suffering. A recent poll said 62% per cent already expected a bailout.

Spain has repeatedly warned that its economy is too big to fail without bringing down the euro.

Ministers have said the euro's fate will be played out in Spain and Italy over the coming weeks, while challenging European colleagues to agree a plan for greater banking and fiscal union in order to calm market pressure.

With European institutions and other countries now increasingly in favour of such a union, pressure on Spain's borrowing costs has relaxed over the past week despite a sudden downgrade by the Fitch ratings agency on Thursday.

Unemployment in Spain is already at 24% and a douple-dip recession looks likely to last until well into next year, bringing more misery.

The European commission said Spain had made no request for aid, but a spokesman added that if it did, the eurozone was ready to help.

"If such a request were to be made, the instruments are there, ready to be used, in agreement with the guidelines agreed in the past," spokesman Amadeu Altafaj said. "We are not at that point."

Germany's chancellor, Angela Merkel, denied pressing Spain and said it was up to Rajoy to request a bailout. "It's down to the individual countries to turn to us," she said. "That has not happened so far."

Unnamed German officials told Reuters, however, that an agreement needed to be hammered out before the Greek election next weekend.