Spain saw solid demand for its bonds on Thursday, paying over 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. In terms of pricing they came in substantially below secondary market levels, strategist at West LB, Michael Leister said.

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.

Spain has been in the line of fire in the euro crisis since Greece was bailed out more than a year ago, but austerity measures which have almost halved the budget deficit and a massive banking restructuring programme has 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 elected 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 economist at Spiro Sovereign Strategy Nicolas Spiro.

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 following the auction .

SOCIALIST'S 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.

The Treasury raised 6 billion euros (5 billion pounds) from the auction 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.

Spain faces medium and long-term debt redemptions of nearly 50 billion euros of medium in 2012 though is must also finance a public deficit of around 5 percent of gross domestic product.

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.

(Reporting By Paul Day; Edited by Tracy Rucinski and Jeremy Gaunt)