Spain's debt levels will jump to their highest since at least 1990 this year as the economy sinks into recession and borrowing costs rise.

The rising debt levels add to a gloomy outlook for the Spanish economy, which is suffering as the government cuts spending in an effort to improve its finances and meet a strict European Union deficit goal next year.

Spain's debt-to-gross domestic product ratio will soar to 79.8 percent in 2012, from 68.5 percent last year, the government said in its budget presentation on Tuesday, just after data showed another rise in the number of unemployed.

The budget aims to save 27 billion euros ($35.91 billion), on top of existing cuts made by Prime Minister Mariano Rajoy's centre-right government.

Spaniards have been fairly tolerant of his austerity but thousands turned out for a general strike last Thursday in a sign patience may be wearing thin.

The challenge of this budget is to recover the confidence of our European partners, of European institutions, of investors in Spain, Treasury Minister Cristobal Montoro said as he unveiled new budget details.

The government said the rising debt-to-GDP ratio was due to high borrowing costs as well as the cost of the bank rescue fund, the power tariff deficit fund, the fund to help regions pay service providers and Spain's payment to the Greek bailout.

Investor confidence in Spain has improved since the height of the euro zone debt crisis last summer as a second rescue package for Greece was approved.

But the premium investors demand to hold Spanish over German debt has started to climb again in recent weeks, rising 3 basis points on Tuesday from Monday's close, on fears the government will not bring the deficit under control.

Spain must reduce its deficit to 5.3 percent of GDP this year and to the EU limit of 3 percent of GDP in 2013 from 8.5 percent last year.

REGIONS UNDER PRESSURE

The government said the country's 17 autonomous regions, which together with local authorities account for around half of all spending, must keep cutting costs.

Given that a large part of the (deficit) deviation has been produced by the regions, these must, as much as the central administration, adopt the necessary measures without delay to correct this situation, the budget documents said.

The central government has said it will punish regions which overspend.

We have all the weapons needed for the regions to meet the deficit targets, Montoro said.

Some economists say the outlook for Spain is so uncertain that it may eventually have to turn to outside financial assistance like Greece or neighboring Portugal, to help pay its debts or keep the banking system afloat.

Spain's banks have been badly hit by the 2008 collapse of the real estate market and are struggling through a consolidation process to rebuild battered balance sheets.

The budget also noted debt issuance would focus on shorter- rather than longer-term, 15 to 30-year paper, reducing the average maturity of the country's bonds in circulation to between 6.2 to 6.4 years. It did not change its gross issuance plan.

Spain has completed 44 percent of its bond issuance program for this year, with auctions supported by a flood of liquidity from two exceptional European Central Bank loan operations. ($1 = 0.7518 euros)

(Reporting By Nigel Davies; Writing by Paul Day; editing by Anna Willard)