* Investors snap up 31-year term debt at latest sale
* Confidence in Spain after euro zone crisis
* Bond sale three times oversubscribed
* Economic prospects limited and unemployment still high
By Fiona Ortiz
MADRID, Oct 9 (Reuters) - Spain's gradual recovery from years of financial crisis received a vote of confidence on Wednesday from investors who bought heavily into a new 31-year government bond despite limited prospects for economic growth and stubbornly high unemployment.
The sale marked a major improvement from a year ago when Spain was at the centre of the euro zone debt crisis, paying as much as 7 percent to sell 10-year debt at auctions that depended on buying by big Spanish banks and the state pension fund.
Centre-right Prime Minister Mariano Rajoy can also take comfort from improving opinion polls and a more stable political outlook than in fellow euro zone strugglers Italy and Portugal.
Wednesday's was Spain's first new long bond since 2009, and the Treasury received 10 billion euros ($13.6 billion) in offers, more than three times what it had planned to sell, half from foreign investors. Spain will pay around 5.2 percent to holders of the debt.
"In July we were paying this price for half the duration. This says the market continues to have a constant appetite for Spanish paper ... These yields are comparable with what we were issuing, six, eight, 10 years ago," said a source at Spain's Treasury, who asked not to be named.
With a backstop from the European Central Bank in place in case euro zone jitters return, liquidity from Japan and the United States flooding the markets and most of Europe's economy starting to pick up, Spain's financial situation has eased significantly.
The economy is also picking up, but slowly and unevenly.
In the July-September period gross domestic product will expand for the first time in more than two years, albeit slightly, and the International Monetary Fund just improved its outlook for 2013, though still sees a 1.3 percent contraction.
It sees growth next year at a tepid 0.2 percent.
So far, the sole economic driver is exports, which includes record foreign tourists this year, while retail sales fell for a 38th month in a row in August and bankruptcy filings jumped 27 percent in the first seven months of the year.
On the debt front, Spain has almost completed its 2013 funding needs and last week prepaid 12 billion euros in an expensive syndicated loan from banks. And investors now want the Treasury to consider issuing a record-long 50-year bond.
Rajoy, who slashed spending last year to try to bring the public deficit under control, travelled to Japan last week to drum up investment, touting an increase in competitiveness after he loosened labour market rules.
Rajoy can also cite an expensive but successful cleanup of Spain's troubled banks after 40 billion euros in Europe-backed funds were pumped into lenders that got over their heads in loans to builders. Unfortunately the bail-out has also forced up Spain's once admirably low debt-to-GDP ratio to over 90 percent.
He is taking steps to make the state pension system more sustainable - 16 million workers support 9 million pensioners and 6 million unemployed - by delinking pensions from inflation.
But unemployment remains high at 26 percent and is seen barely falling next year. Even more worryingly, long term unemployment - those out of work for more than a year - has risen steadily to close to half of all jobless.
Economists fear that many of those people will never return to work and will become a permanent drag on domestic consumption and the state welfare system.
"What recovery are you talking about if the numbers show there are more unemployed. The only thing you've recovered is inequality," Socialist opposition leader Alfredo Perez Rubalcaba said recently in a parliamentary debate.
STABILITY IS EVERYTHING
On the political front, compared with perpetual upheaval in Italy and a near collapse of the Portuguese government next door in July, Spain's ruling PP can boast greater stability although the country inevitably faces some challenges.
The biggest political disruptions are coming from Catalonia, where a growing independence movement may force Rajoy to negotiate more tax autonomy for the wealthy northeastern region.
The Catalan secession drive, as well as a looming handover from ailing King Juan Carlos to his popular son, Prince Felipe, could fuel demands for constitutional reform in Spain in the nest few years.
For the moment, Rajoy has shrugged off a major corruption scandal that earlier this year threatened to divide his own party, and has bounced back in opinion polls despite unpopular spending cuts on hospitals and schools.
The latest survey by Metroscopia polling firm showed that the PP had 34.1 percent voter support, up from 30.5 a month earlier.
On the right wing of the ruling party, critics say Rajoy is squandering an opportunity to use his absolute majority in parliament to pass more free-market reforms, such as trimming bureaucracy and cutting income tax.
Meanwhile, Rajoy appears content to bank on an incipient economic recovery next year to allow him to reduce some taxes in early 2015 in order to lure back the voters he needs to give him four more years in office.