Spain spread cheer in euro zone markets on Thursday with a successful bond auction where it sold more then double its target and cut borrowing costs in 2012's first real test of appetite for debt from the euro zone's bruised periphery.

The Treasury raised 10 billion euros ($12.7 billion) from the auction of three bonds, having aimed to sell five billion, and yields dropped by about 1 percentage point.

European shares extended gains in response and the euro currency rose to a session high.

But Spain still faces huge challenges this year to meet tough deficit targets after the government missed its 2011 cost-cutting goal and the economy sinks into recession.

Domestic banks continued to lend support thanks to ultra-cheap funding from the European Central Bank, which provided banks with nearly half a trillion euros of three-year money late last year and will make a similar offer in February.

Basically the only reason this has been taken down so well is abundant ECB liquidity and with another one coming up in February, just for now the market seems very complacent, said Michael Leister, strategist at DZ Bank in Frankfurt.

Analysts questioned how long the banks would be willing to hold medium to longer term government debt.

Plus we have to keep in mind that January sales will probably be the lowest of the first quarter and over shorter terms (than February and March), which makes them easier to absorb, a fixed income analyst based in Madrid said.

Italy also fared well, paying less than half what it did a month ago to sell one-year bills at its first auction of 2012.

The yield on Italian 12-month bills fell to 2.735 percent, from the near 6 percent yield Italy paid to sell one-year paper at a mid-December auction. It was the lowest since June 2011.

Italy will launch its 2012 bond issuing campaign on Friday when it offers up to 4.75 billion euros of debt including its three-year benchmark and two off-the-run issues.

(Reporting By Tracy Rucinski; Editing by Fiona Ortiz/Mike Peacock)