Spain saw solid demand for its bonds on Thursday, paying more than 2 percentage points less to borrow over 5-years than Italy a day earlier as budget cuts helped ease concerns it could be among the next to fall in the euro zone's debt crisis.

But while the Treasury also paid much less to sell two 10-year bonds than a similar issue just a month ago, yields were still near euro-era highs amid doubts over leaders' ability to find a lasting solution to the bloc's debt crisis.

A good auction ... they managed to sell quite a chunk. It won't help to calm these fears everyone in the market is having about funding in 2012, but Spain is considered a far more attractive credit than Italy, strategist at West LB, Michael Leister said.

Spain has been in the line of fire in the euro crisis since Greece was bailed out more than a year ago. But measures which have almost halved the budget deficit along with a massive banking restructuring program have taken some of the heat off.

Attention has turned instead to the euro zone's third largest economy, Italy, which has seen refinancing costs soar to unsustainable levels and its Prime Minister Silvio Berlusconi replaced by technocrat caretaker Mario Monti.

The contrast with Italy is striking. Spain, despite its severe economic problems, is judged to be a safer credit, said Nicholas Spiro, economist at Spiro Sovereign Strategy.

Italy is walking on very thin ice at the moment given the scale of its funding needs next year. Spain is better placed on this front and has more policy-making credibility in the eyes of investors.

The premium investors demand to hold Italian over Spanish debt rose to a new record of around 162 basis points on Thursday while Spain's spreads against German debt dropped more than 24 basis points following the auction.

SOCIALISTS TROUNCED

The centre-right People's Party (PP) trounced the Socialists in November 20 election as voters punished Prime Minister Jose Luis Rodriguez Zapatero for his handling of the economic crisis though his measures have kept Spain needing a Greek-style bailout.

Incoming Prime Minister Mariano Rajoy has said he will continue with the previous government's austerity measures and cut the budget shortfall from an expected 6.5 percent of GDP this year to 4.4 percent of GDP next year.

Pollsters say Spaniards are largely resigned to the idea of more cuts, but that sentiment could fade within a year if the economy does not bounce back from a prolonged slump.

Spain's economy stagnated in the third quarter and is widely expected to sink into its second recession in three years at the start of 2012 as domestic demand shows no sign of returning and exports are hit by the global slowdown.

Meanwhile, the burst property bubble has left the country's banks sitting on 176 billion euros ($227.94 billion) of potentially troubled real estate assets at end-June and struggling to raise capital to shore up balance sheets in a paralyzed market.

Rajoy has said his priorities when he takes office next week are to balance the public accounts, reform the labor market -- Spanish unemployment is more than double the European Union average -- and intensify bank restructuring efforts.

RISING COSTS

As market nerves rise over the future of the euro zone, Spain's government has found it increasingly expensive to issue bonds but with a debt-to-GDP ratio of around 68 percent, around 20 percentage points below the euro zone average, it has some margin.

Spain also faces a less pressing redemption calendar than Italy, with medium and long-term debt redemptions of nearly 50 billion euros in 2012 with none due until April.

Rome meanwhile faces redemption and coupon payments of around 100 billion euros between January and April, Reuters data shows.

The Spanish Treasury raised 6 billion euros from the auction on Thursday of three bonds in the primary market, far surpassing a target of 3.5 billion euros and meaning the Treasury has completed its end-of-year bond issuance goal.

The auction came as markets braced for a possible ratings downgrade after a disappointing summit of European Union leaders on Friday.

Spain sold 2.5 billion euros of a bond maturing January 31, 2016 at a yield of 4.023 percent, compared to 5.276 percent when it was last auctioned December 1. The bond was 2 times subscribed after 2.8 two weeks ago.

The bond maturing April 30, 2020, sold 2.2 billion euros at an average yield of 5.201 percent while a bond maturing April 30, 2021 sold 1.4 billion euros for 5.545 percent.

The last time Spain ran a primary auction a 10-year bill November 17, it paid an average yield of 6.975 percent, considered by most economists as unsustainable over the long term.

However, while the benchmark 10-year yield was down from recent highs during volatile trade, it was still far above prices paid from the average yields seen before June.

These are still high levels of rates but they are a lot better than Italy's ones, strategist at Monument Securities Marc Ostwald said.

(Additional reporting by London debt desk.; Edited by Tracy Rucinski and Jeremy Gaunt)