Spain plans to auction up to 2 billion euros worth of bonds Thursday in what could be an important test of the government's ability to raise money from investors.

Days after the Spanish treasury minister said the government is in danger of being shut out of the market, Madrid will offer between 1 billion and 2 billion euros worth of 2-year, 4-year and 10-year bonds.

Spanish bond yields have been rising recently as investors demand an increasingly high risk premium to lend money to the government. The yield on 10-year Spanish bonds spiked to 6.6% last week before falling back to about 6.3% this week.

The fear is that Spain will need to be bailed out if it cannot come up with a way to recapitalize the banking sector, which could cost up to 100 billion euros by some estimates. The Spanish government has signaled that it will need outside help, but it remains to be seen if Germany will back a plan to allow bailout funds to be pumped directly to banks.

Berlin wants the money to be channeled through the Spanish government, which would then be subject to conditions. Madrid has so far resisted asking for a full-blown bailout, since doing so would require the nation to impose even deeper budget cuts amid an economic recession.

In a potential compromise, European Union officials are reportedly considering a limited rescue for Spain that would involve less austere terms in exchange for increased oversight of the nation's banks, according to the Financial Times.

This approach, call it bailout-light, could be more politically palatable for Spanish Prime Minister Mariano Rajoy.

Spain slipped back into recession during the first quarter, and it has the highest unemployment rate in the eurozone, at nearly 25%. In addition, the central government may need to rescue some of its semi-autonomous regions, such as Catalonia, which are struggling to remain solvent.

On the bright side, Spain has made significant progress toward meeting its refinancing needs this year.

Spain has already sold 55% of the 86 billion euros worth of debt it plans to issue this year, making it second only to Belgium in terms of issuance, according to research from Societe Generale. That leaves 39 billion euros left to issue, or about 8 billion euros per month over the next five months.

Overall, Spain has a relatively low debt-to-GDP ratio of about 60%. But that may not be the case for long if Madrid ends up footing the bill for the banks, regional governments and economic meltdown.