Spain drew healthy demand for its five-year debt Thursday, with an only modest rise in yields encouraging hopes it can ride out the threat of contagion from a euro zone debt meltdown that has swallowed neighboring Portugal.

The Treasury sold 3.4 billion euros of the bonds, just below the mid-point of its 3-4 billion euro target, and the issue took 6.3 billion in bids.

But evidence that Spain remains under pressure came as it paid more to attract buyers than at the auction of the same bond two months ago.

While investors perceive the country to be in a better position to manage its debt than its weaker peers on the euro zone periphery, a struggling economy could well see markets turn against Madrid again this year.

The average yield was 4.549 percent, up from the 4.389 percent at the bond's last auction on March 3 and roughly in line with secondary trading, which rose about 5 basis points before the auction.

By comparison in Paris, AAA-rated France sold 9.5 billion euros of government bonds with maturities ranging from eight to 21 years, with the shortest-dated paper selling at an average yield of 3.51 percent.

Analysts said the French auction was well received by the market.

Antonio Torralba, head of flow trading at BBVA, said the Spanish sale also went well.

It's been a good auction with decent demand. In the last two weeks we've seen Spanish spreads come down about 30 basis points, separating itself clearly from Portugal, but also reducing the spread with Italy, said

Yields on Spanish debt have fallen this week, with the key spread between its ten-year bonds and benchmark Bunds falling below the 200 basis point mark for the first time in a month.

Torralba said European institutional investors had come back into the market after spreads widened suddenly a few weeks ago.

The last market leap in Spanish spreads came when Portugal began negotiating its bailout and rumors of Greek debt restructuring were circulating.

The five-year bond saw decent demand, with a bid-to-cover ratio of 1.9, compared with 2.2 at the last auction.

(Editing by Fiona Ortiz; Editing by John Stonestreet)