Spain is on the mend, Prime Minister Mariano Rajoy claimed today as he revealed that the budget deficit fell to less than 7% of GDP in 2012, from nearly 9% a year ago.

The government has been trying to heal its public finances by cutting spending and raising tax.

While that has come at a price for the economy, which is in another recession and hobbled by 26% unemployment, Rajoy noted it was finally bringing the deficit down.

"Spain's head is out of the water," Rajoy told Parliament in what was his first state of the nation debate since taking office in December 2011.

Rajoy said the deficit reduction followed "a readjustment without precedent" in the economy. Official deficit figures are expected over the coming weeks.

Spain last year pledged to European authorities it would cut its deficit to 6.3% after the 2011 figure was found to have soared to 8.9%, nearly three-times the limit for euro zone states.

But in his pursuit of the promised deficit reductions, Rajoy broke every major election campaign promise, stirring much social opposition and triggering two general strikes over the past 14 months.

He admitted today that he had failed to live up to some promises but insisted he had done his duty.

Rajoy promised "a second generation of reforms" that appeared to signal a shift in strategy - away from growth-sapping austerity policies in favour of credit incentives and young employment.

The measures include a reduction - and in some cases elimination - of social security payments by companies that hire people under 30 years of age part time.

He also announced a €45 billion credit programme for small and medium-sized companies to be funded publicly and privately.

Rajoy began his near two-hour speech recalling that the country had nearly 6 million people out of work.

He promised there would "not be a single moment of relaxation" until they had turned the economy around.

About one million additional people have lost their jobs under Rajoy's administration and the unemployment rate for people under 25 is now at 55%.

He boasted, however, that despite the economic legacy left by the previous Socialist government his administration had changed the country's direction. "Nobody would have bet on Spain a year ago but now nobody doubts that Spain will come out ahead," he said.

Spain's government borrowing costs soared to unsustainable highs above 7% last year, bringing the country close to having to seek a sovereign bailout loan like Greece, Ireland and Portugal.

A promise by the European Central Bank in August to buy up bonds from countries that formally seek aid calmed investor concerns, however. Spain's borrowing rates have since eased to manageable levels.

Although several Spanish banks hit by the crisis were loaned €40 billion by the country's euro zone partners, the government insists it will not need any more external financial aid.