Just before the financial crisis broke Spain was suffering a current account deficit of 8 percent of gross domestic product. This year the country should record a current account surplus of 2 percent of GDP.
This is a remarkable turnaround, the result of a strategy that Economics Minister Luis de Guindos has called "an internal devaluation." What he means is that since Spain, a member of the eurozone, was unable to devalue its currency it had to become more competitive by holding down wages and driving down costs.
This has been achieved, spectacularly so. Spain's unit labor costs have dropped around 15 percent since the crisis began and its productivity has risen nearly 7 percent. Foreign investors have taken note. The latest Foreign Direct Investment Confidence Index has Spain jumping 10 places in the ranking to 16th position as a place where investors want to invest.
(Interest declared: The index is produced by A.T. Kearney's Global Business Policy Council, of which this columnist is a senior fellow. The council surveys more than 800 top executives worldwide who between them account for more than 75 percent of FDI allocations.)
Spain isn't yet out of the woods. Unemployment remains alarmingly high, particularly among young people. Its banking system has been badly battered and suffers from non-performing loans. Retail sales are still dropping and the bursting of the real estate bubble has left some 800,000 houses and apartments empty or unfinished.
But Spain hasn't let this crisis go to waste. Long-delayed structural reforms in the labor market have been pushed through, judicial procedures have been streamlined and public sector pay has been cut. Red tape has been slashed to make it easier to hire and fire and to start a company. The rail and freight transport systems have been de-regulated and exports promoted through special credit lines and insurance guarantees.
For the eurozone as whole Spain's recovery is or prime importance, not only because Spain is the eurozone's fourth largest economy (after Germany, France and Italy) but because of the way it is taking place. Spain's recovery is following the German game plan, as drafted in Berlin.
The German government led by Chancellor Angela Merkel and Finance Minister Wolfgang Schaeuble has come in for heavy criticism for their advocacy of austerity as the price Europe's troubled economies must pay in return for support from their wealthier partners. This has meant cuts in public spending and wages, increases in the retirement age to reduce pension costs along with higher taxes. This has resulted in hard times, job losses and declining prosperity, which carried with it a high political risk for any government sufficiently bold or determined to try it.
Most governments that embarked on such a course lost the next election, which happened in Greece, Spain, Portugal and Italy. But for Spain, this means that the center-right government of Mariano Rajoy was elected in mid-crisis with a mandate for reform and the prospect of two more years in office, which means Spain could be enjoying the fruits of recovery by the time they face the voters again.
Spain's success is by no means guaranteed. A new banking crisis or a turndown in the global economy triggered by a technical default in the United States could derail the recovery just as it is getting under way. But for the moment, sighs of relief are beginning to be heard in Berlin as well as in Madrid.
But a further problem looms. The Berlin prescription of austerity, wage and budget cuts, is based on the shaky assumption that Europe's sick economies need to become more like Germany, focusing on exports, competitiveness, productivity and less public spending. The difficulty is that not everyone can start running an export surplus. One country's export is another country's import so by definition the Berlin model requires other countries to run heavy trade deficits.
It was by running a heavy trade deficit (mainly with Germany) that Spain got into trouble in the first place. Indeed, the euro system, by making German exports cheaper than they would have been had they been priced in the old deutschemark, has given a major boost to German exporters. Not every eurozone country can be a Germany.
Maybe the eurozone can afford a second country with a big trade surplus but it seems more probable that likely importers, such as France, Britain, Italy and the Nordic counties, would themselves prefer to be exporters and build up trade surpluses. But not everyone can be a winner with the German model. Spain's success could simply shift the problem to Italy.