Spain's beleaguered economy is out of the woods and will not need a Greek or Irish-style bailout despite the risk of contagion from troubled neighbour Portugal, according to its Socialist prime minister, José Luis Rodríguez Zapatero.

In an exclusive interview with the partner publications from the Guardian's New Europe project, the continent's most powerful leftwing prime minister insisted that reforms and an austerity programme designed to reverse a runaway deficit were bearing fruit.

He refused to be drawn on his own plans, amid rumours that he will announce tomorrow that he will not stand for a third term at elections due early next year. His Socialist party currently trails the opposition conservative People's party by 16 points in opinion polls.

The comments, from a prime minister whom Spaniards describe as "anthropologically optimistic", came as market pressure on the country's sovereign debt showed signs of relaxing, despite growing problems in both Portugal and Ireland. "We now have economic growth. The debt risk has stabilised and is out of danger. And now we are close to creating jobs," Zapatero said.

Zapatero sees no conflict between being a deficit warrior and a socialist, but points to key differences between his cuts package and that of Britain's coalition government. "There is a deep, deep difference between what our government has done on education during the crisis and what Cameron's government has done," he said, pointing to education spending that has risen to 15% of Spain's GDP for the first time.

"The fundamental difference between right and left is the capacity to redistribute spending and remove obstacles to equal opportunities," he insisted. "We haven't reduced spending on health. We've increased spending on unemployment. We've maintained spending on social care of the dependent. Why do we do it? To maintain social cohesion."

Instead Spain's government had brought down its deficit by, among other things, cutting civil service pay and freezing pensions. Zapatero said that, having met last year's deficit reduction target, Spain would also hit this year's 6% goal. "Our priority measure is the strict meeting of the deficit target," he said.

Although he claimed jobs would be created soon, the timid growth that some critics blame precisely on spending cuts has had no impact on a startling 20% unemployment rate. "My main anguish is about those people who lose benefit payments but have trouble finding work," he said.

Reforms in the pipeline should bring more flexible collective bargaining, improved competitiveness and a law to limit deficit spending, he said.

"It's true that some reforms mean cuts, but others are simply changes," he said. "No project can call itself leftwing unless it commits to a competitive economy … we are going to renew Spain's economic structure."

He warned Portugal that if it wanted to escape a bailout it had no option but to adopt the austerity package that its parliament rejected last week, bringing down José Sócrates' Socialist government and triggering a June election.

"Carrying out the Sócrates austerity plan presented to parliament is fundamental," Zapatero said. His comments came even before Portugal admitted that its 2010 deficit was €3bn (£2.6bn) higher than originally estimated.

Zapatero, speaking before Ireland revealed that it needed a further €24bn to deal with its banks, said he favoured more aid to Greece and Ireland. "We should be ready to increase the aid if they need it," he said.

Like most Spanish politicians, he is an avowed pro-European and saw greater economic integration within the EU as an unexpected but welcome side-effect of the crisis.

"Economic integration is being speeded up. That much is clear," he said. "Integration in politics and security is going more slowly, but it will come. It may take five or 10 years, but the process is inevitable."

He admits that, like everyone else, he would have liked Europe to react faster to the economic crisis. "But it is obvious that, amongst democratic countries, there is something called a decision-making process," he said. "The Spanish government is lucky because parliament is always very pro-European … but there are other parliaments in Europe that debate every last cent."

Even the Libya crisis was an example of Europe in action, he said. "Who brought a historic resolution to the [UN] security council to intervene in Libya? Two European countries: France and Britain," he said. "It is Europe that has taken the lead."

The man who pulled Spain's troops out of Iraq when first elected in 2004 said the UN resolution was a historic step for human rights. "It is the first time we have had a resolution based on a responsibility to protect people," he said.

"A huge amount of care and restraint is being exercised," he said of the campaign. "We have not had that thing that is so heartrending – and which discredits these operations – which is civilian victims."

But Zapatero, who has sent aircraft and warships to join the Libya campaign, insisted that military means should not be used to oust Gadaffi. "The use of arms is for protecting the population," he said. "For regime change we have our political and economic strength."

Europe's task did not end, there, he insisted. "The north of Africa and the Mediterranean as a whole are going to look towards the north. They will look to Europe, and Europe must not look away."

Wind power became Spain's biggest energy source for the first time in March, but events in Japan have not changed Zapatero's policy of using nuclear energy, while refusing to build extra capacity.

"When nuclear power stations come to the end of their lifespan they will be closed," he said. "We don't propose building new power stations and must guarantee the production of alternative sources to cover the closure of every nuclear power station."