Eurozone crisis explained
Worries are increasing that Spain may become the fourth eurozone country to require a full bailout.
It has already asked for help with its banks - its main problem - and will receive up to 100bn euros ($125bn; £80bn) to be targeted at its financial sector.
An audit has now revealed that its banks may need two-thirds of that amount to cover its bad property assets in a worst-case scenario.
But with the recession in the country deepening it is struggling to balance its books and further pressure is coming from its regional governments, who are starting to ask Madrid for financial help to deal with their own debt issues.
What went wrong with Spain?
Spain's story illustrates the fact that the eurozone's problems run far deeper than the issue of excessive borrowing by ill-disciplined governments.
Greece, Portugal and Italy all had way too much debt.
But the Spanish government's borrowing was under control - that is, it ran a balanced budget on average every year until the eve of the 2008 financial crisis.
And as Spain's economy grew rapidly before 2008, its debt-to-GDP ratio was falling. Germany's, by contrast, continued to rise.
After Spain joined the euro, the country experienced a long boom, underpinned by a housing bubble, financed by cheap loans to builders and homebuyers.
House prices rose 44% from 2004 to 2008, at the tail end of a housing boom. Since the bubble burst they have fallen by a third.
The economy, which grew 3.7% per year on average from 1999 to 2007, has shrunk at an annual rate of 1% since then.
So, although the Spanish government still had relatively low debts, it has had to borrow heavily to deal with the effects of the property collapse, the recession and the worst unemployment rate in the eurozone.
What has happened at the regional government level?
Spain's 17 regional governments collectively have large debts of their own.
They run and pay for most of their own services, including social services, health and education, with the central government in Madrid funding less than 20% of national spending.
In the boom years they spent lavishly on new infrastructure and big projects like airports and swimming pools.
Valencia, which built an airport at which not a single plane has landed, has now asked the central government in Madrid for financial aid.
So too has Spain's largest regional economy Catalonia, as well as Murcia and Andalucia.
They are under pressure from the central government to cut spending, but local politicians are reluctant to take unpopular action.
The regions collectively need to refinance 36bn euros in debt this year.
This is intensifying political tensions, too. Catalonia's regional government has called snap elections for 25 November, which are being seen as a referendum on Catalan independence and could also jeopardise plans for national economic reforms.
Not all of them have large debts though, the coal-mining region of Asturias in the north of the country is relatively debt-free. The region of Madrid itself has said it has already covered all its refinancing needs for the year, while Navarra, Galicia, Cantabria, Aragon and the Basque Country all seem to be on a sounder financial footing.
What is the problem with the banks?
It is a familiar tale of high-living in the boom years, followed by an uncomfortable return to reality.
Before the credit crunch, the banks had been thriving thanks to the rapid expansion of the property sector.
But its collapse caused a plunge in the value of the assets the loans were based on, and meant borrowers had trouble making repayments.
The situation has been made worse by the fact that the banks borrowed the money on the international markets to lend to developers and homebuyers, a much riskier strategy than using the deposits they get from savers.
That has left many banks struggling with massive losses. But not all of the banks are in this situation, however. The International Monetary Fund said a large part of the banking sector, including Santander and BBVA, is well run and resilient.
What has been done to help troubled banks?
Spain has begun to restructure its banking sector.
Many of its smaller, weaker banks have had to merge or have been rescued by larger ones. The number of branches has been cut by 15%, and 11% of the jobs in the industry have gone.
Bankia, Spain's fourth-largest bank, has been part-nationalised and billions of euros of public money pumped into it.
Bankia itself was formed when several regional banks, or cajas, were brought together because they were deemed too small to survive the economic downturn.
However, the size of the banks' problems and the weakness of the recession-hit Spanish economy, meant the country had to turn to its fellow eurozone members for help.
Borrowing the funds from the international markets would have cost too much.
Like credit card companies, investors demand higher interest the riskier a prospect they think you are.
How will the bank bailout work?
Spain will be able to borrow up to 100bn euros. But it isn't a bailout or rescue, it insists.
The help it gets will differ from the bailouts given to Greece, Portugal and Ireland in a number of ways.
The loans will come from eurozone funds set up to help members in financial distress: the European Financial Stability Facility and the European Stability Mechanism.
In previous cases, money has come from international authorities such as the International Monetary Fund, as well as the eurozone.
Also, the money will be targeted specifically at Spain's banks, rather than at the economy as a whole through central government.
Spain was desperate to avoid this, as the sovereign bailouts have previously come with politically unpopular demands to cut spending and raise taxes and close supervision of the countries' finances.
The final figure of how much of the 100bn euros Spain will want to borrow is still unknown.
On 28 September, an independent audit calculated that Spain's banks needed an injection of 59.3bn euros to survive a serious downturn.
Will the bank bailout be enough?
Although Prime Minister Mariano Rajoy has long insisted that Spain would not become the fourth eurozone country in recent years to ask for a full bailout, many commentators believe it is now only a matter of time before the government requests one.
The recession in Spain is deepening, and that will make economic recovery even more difficult, as it means the government will receive less in taxes and have to pay more out in benefits.
The government will present details of its latest budget this week, with further austerity and economic reform measures expected.
Those reforms could form the basis of a bailout agreement, with Spain promising to get its economy back on track and severely cut its deficit in exchange for substantial outside help.