Spain managed to sell 2.5 billion euros ($3.3 billion) of bonds at auction on Thursday, as much as it wanted, but at a cost of rising yields as the country struggles to tame its deficit.

Including earlier issuance, Spain has now raised half of its gross target for this year, making the most of market liquidity after Europe's banks took more than a trillion euros of ultra-cheap three-year cash (LTRO) from the European Central Bank in December and February.

The Treasury sold 1.1 billion euros of a bond maturing October 31, 2014, at an average yield of 3.463 percent and a bid-to-cover ratio of 3.3, compared with a ratio of 2.0 at the last auction in October.

Spain also tested market appetite for a longer-term benchmark bond, due January 31, 2022, of which it sold 1.4 billion euros at a yield of 5.743 percent.

The bond was 2.4 times subscribed, after 2.2 times at the last primary auction in January, when the bond sold at an average yield of 5.403 percent.

Yields on the 10-year bond rose after the auction, however, suggesting investors remain concerned about the country's long-term fiscal sustainability.

A reasonable set of results, which will go some way to allaying fears the domestic bid for Spanish bonds has dried up. That said, as evidenced by the accepted yield on the 10-year, this support does come at a price, rate strategist at Rabobank Richard McGuire said.

The yield on the 10-year bond peeped above 6 percent on the secondary market on Monday for the first time since the end of November, sparking concern it could soon become impossible for the government to affordably refinance itself.

The Treasury aimed to raise between 1-5 and 2.5 billion euros in the auction of the two bonds.

EXTRA LEEWAY

With half its annual target raised so far this year, the Treasury now has some leeway to issue debt at a slower pace later in the year if borrowing costs remain high.

Spain's banks, virtually closed off from international wholesale debt markets with investors spooked by the property-related assets on their books, have used large chunks of the ECB loans to buy domestic paper.

Meanwhile, non-residents have been dumping Spanish sovereign debt; investors residing outside of Spain have cut their holdings to 42 percent of the country's debt in February, down from 50 percent just two months before.

Spain entered its second recession since 2009 in the first quarter after more than four years of contraction or minimal growth In the aftermath of a collapse in its property market.

The Treasury can afford to ease off the gas ... but Spain remains under the cosh and locked in a negative feedback loop, said Jo Tomkins, strategist at 4Cast.

No doubt domestic (banks) played a key role in shaping the success of today's sale, but we have seen growing signs of fatigue post-LTRO II, and this is worth keeping a watchful eye on in the coming weeks and months.

(Reporting By Paul Day; Editing by Will Waterman)