Last weekend provided a spectacle of self-worth and confidence in Madrid with thousands of people crowding the centre of the city for its annual gay pride event.

Madrid’s festivities are heralded by locals - gay and straight alike - as the foremost such event in Europe, with attendance and la fiesta said to outshine those held concurrently in London and Vienna.

Demonstrators passed through the streets and parties were seen across neighbouring balconies.

Celebrations culminated on Saturday with Kylie Minogue, the doyenne of gay ambassadors, giving an open-air show in the Plaza Espana and providing credibility to the event's claims of pre-eminence.

But on the same night, Spain itself took a step towards being pulled from its own faltering self-regard.

'La Roja’s' 2-1 victory against Paraguay, in the quarter finals of football's World Cup, has given timely pride and ballast to a nation, where weeks ago there was little.

Before the World Cup, Spain’s economic fallibility dominated national attention.

Unemployment of almost 20 per cent – twice the EU average – and a deficit of more than 11 per cent, led to anxiety that the country would follow Greece in requiring international bailout loans.

Jose Luis Rodriquez Zapatero's government made spending cuts to regional funding and reduced public sector pay by five per cent, while union strikes against such moves brought parts of the country to a halt.

The newspaper salesman near my apartment said that in the months before the World Cup jauntiness was scant.

"The people had little faith in capitalism and politicians. They didn’t have faith and confidence in anything and weren’t spending money," Alberto Aguado said.

Yet the Spanish live-for-the-moment attitude, most visible in the capital, appears to have returned for the time being.

The country is generating football heroes like Rioja produces wine, with tournament top-scorer David Villa, playmaker Andres Iniesta, and quarter-final penalty-saver Iker Casillas among those to pick from.

Joachim Low, the coach of Germany whom Spain meet in Wednesday’s semi-final, has said the nation has several Lionel Messis and that he modelled the play of his own side on that of his forthcoming opponents.

Certainly Spain’s impressive substitutes' bench – that could feel the weight of Fernando Torres, Cesc Fabregas and Pepe Reina on Wednesday – is enough to cultivate envy from national football coaches.

The sporting distraction from economic realities would be welcomed by politicians in the UK, Italy, Greece and beyond.

To add to the footballing fervour, over the weekend Rafa Nadal won Wimbledon, the most prestigious of tennis grand slams, and Jorge Lorenzo extended his lead in the Moto GP World Championship in a race in Barcelona.

Newspapers have subsequently led with "Spanish sport sweeps to victory" and "Spain scares".

Local Jorge Lado said that whereas before people were thinking of the real problems, now there is a lot of satisfaction.

"In the moment of the game we forget about the problems … Iker is the best," Lado said.

"Spain are going to win the World Cup and it will be spectacular and historic."

Aguado said that his sales have gone up with the rising national happiness.

But as Spain reaches a football landmark - it is the first time it has reached a World Cup semi final - it remains at a pivotal point in its recent history.

Whether or not the national team is victorious in the semis, or indeed the final, the significant economic difficulties and potential social tensions will continue.

Government critics are already saying that more cuts need to be made to stave off financial collapse.

Aguado believes that after the World Cup things will return to as they were before.

It can just be hoped that for another five days at least, the gaiety will continue.

Follow Rhodri Davies on Twitter: @rhodrirdavies