The economic news has changed and so have the puns. For headline writers and research analysts, Spain no longer rhymes with “pain” but with “gain”.

It is easy to see why. The country is out of recession, unemployment is falling and the stock market has gained 40 per cent over the past year alone. Growth forecasts are being revised upwards and there are hopes that Spain could emerge as the fastest-growing economy in Europe next year. Meanwhile, Madrid’s borrowing costs have fallen to pre-crisis levels as investors pile into Spanish government bonds.

Even the sceptics at the International Monetary Fund have been won over: in its latest analysis, the IMF this month declared Spain had “turned the corner” and heaped praise on both the government and ordinary Spaniards for their efforts during the crisis.

This week could bring further encouraging news. On Thursday, the national statistics office releases its keenly awaited quarterly labour market survey. If it confirms the recent monthly data, the report will show the recovery is finally translating into jobs – a crucial moment for Spain and its 5.9m unemployed.

Amid the general euphoria, however, some analysts are warning that Spain’s export-led recovery is showing signs of losing momentum where it matters most: in exports.

According to official data, exports in May fell by 1.3 per cent compared to the same month a year ago. The drop was no isolated event. Once viewed as a rare bright spot in dark times, exports have gone from being the main driver of the Spanish economy to one of its principal drags.

In the first three months of this year, the external sector actually made a negative contribution to national output, lowering gross domestic product by 0.2 per cent. And with imports bouncing back much faster than expected, Spain’s trade deficit is ballooning once again – rising more than 80 per cent in the first five months of 2014 compared to same period last year.

For much of the past two years, Madrid has trumpeted the country’s export-led recovery as a sign that Spain’s economy is not just on the mend but undergoing a fundamental overhaul.

Ministers and officials alike boasted that the government’s unpopular blend of austerity and reform had helped the country lower wages and restore its export competitiveness.

As a result, Spain would no longer have to rely on risky housing bubbles and debt-fuelled consumption to lift growth; instead, the country was transforming itself into a new exporting powerhouse, a new Germany on Europe’s southern fringe.

Until recently, the data supported this thesis. Exports of car parts, machinery, chemicals and other goods rose sharply, especially to fast-growing emerging markets, helping Spain to post a small but significant current account surplus last year. In 2007, just before the crisis, the country ran a current account deficit equivalent to 10 per cent of GDP.

Now that the trend has once again gone into reverse, ministers are putting on a brave face. They contend that the sharp rise in imports reflects above all else the jump in shipments of machinery and factory equipment to the Spanish private sector.

It is, they argue, a sign of confidence rather than weakness. The drop in exports, meanwhile, is dismissed as a temporary blip owing to the strength of the euro and emerging market weakness.

There is some merit to these arguments – but they still fly in the face of much that was said by Madrid (and others) over the past two years. The return of domestic demand and private consumption are indeed positive signs, but it is hard to see how they can sustain the country’s economic recovery when Spain is still labouring under sky-high unemployment and towering public and private sector debt.

One way or the other, Spain needs its export machine to start humming again. It was the strength of the external sector that put the country back on to the path of growth, and lifted it out of recession. It would be a cruel irony indeed if the recovery were to falter now because that trend is going into reverse.

Get alerts on Markets when a new story is published

Copyright The Financial Times Limited 2018. All rights reserved.

Follow the topics in this article