MADRID — Spain successfully raised money at a bond auction Thursday amid high demand from investors, but at a punitive cost that underlined the country’s financial fragility just hours before it planned to give more detail about the state of its sickly banks.


The Spanish Treasury sold 2.22 billion euros of bonds, more than the 2 billion euros planned, in an auction that saw more than three times as many buyers as there was debt on offer.


“The modest size of today’s sale helped domestic buyers absorb the supply,” Nicholas Spiro, managing director of Spiro Sovereign Strategy, a London consulting firm that assesses sovereign debt, wrote in a note to investors.


Invoking Italy, whose bonds have also come under pressure lately, Mr. Spiro wrote that “Spanish and Italian auctions are following a similar pattern: while demand is holding up, the concessions are becoming heftier and heftier.”


The Spanish authorities took advantage of a slight dip in long-term borrowing costs, which had reached record highs earlier in the week, amid hopes that government leaders could soon agree on an emergency plan to buy sovereign bonds of Spain, Italy and other euro economies under intense market pressure.


Despite the more favorable interest rate environment, the incentives that Spain had to offer Thursday were still painfully high. The average yield, or interest rate, on two-year bonds was 4.706 percent, compared with 2.069 percent at a similar auction in March.


For five-year bonds, the yield was at its highest level since the inception of the euro: 6.07 percent, up from 4.96 percent the previous month.


On Tuesday the Spanish Treasury managed to sell all the short-term debt it had offered, but at sharply higher cost: 5.074 percent, compared with 2.985 percent, itself a high level, only a month earlier.


Euro zone finance ministers are due to meet late Thursday in Luxembourg with a full agenda that includes a banking crisis in another euro nation — Cyprus — and preparations for the summit of E.U. leaders in Brussels on June 28-29, which will discuss far-reaching changes to the overall architecture of the euro zone.


Before the meeting in Luxembourg, the Spanish government is expected to announce the results of an audit into the state of its banks. It may then make a formal request, stating how much it will need of the 100 billion euros, or $127 billion, that has been offered by Spain’s euro zone partners to recapitalize a Spanish banking sector brought low by loans made before property prices crashed.


For Spain and other countries in a similar situation, one reason for persisting in the bond market despite having to pay high interest rates is to maintain cash flows and meet upcoming financial needs. And given that the Spanish Treasury raises around 90 billion euros in debt financing each year, an auction like the one held Thursday is relatively small, having little impact on the overall borrowing costs for the county.


Another reason for holding a debt sale in less-than-ideal conditions is that, according to the unwritten rules of the bond market, a country that cancels an auction can do huge damage to its credibility, with potentially dire consequences — including being effectively locked out of the market and seeing bond yields spike to levels that would force a request for a full bailout.


So, like a good poker player, a country needs to give the impression of confidence, whatever the reality.


“The risk if you cancel an auction like this is that the market will think, ‘They can’t even sell 2 billion,”’ said Lefteris Farmakis, a rates strategist with Nomura in London.


“If you lose market access, then your bonds will be downgraded to junk, which means that some investors will have to offload them, so there would be enforced selling,” Mr. Farmakis said. “Yields will increase from 6 percent to 12 or 15 percent.”


If, at that point, a country has to ask for a full bailout, “that’s a different game,” he said. “It’s not trivial.”