By Noah Barkin BERLIN (Reuters) - The German soccer team's romp to victory in last month's World Cup was hailed at home as a symbol of the country's emergence as a confident global economic power.
But in an ironic twist, the feel-good triumph in Brazil may have come at a time when Germany's new "Wirtschaftswunder", or economic miracle, is coming to an end.
In recent weeks, the economy that proud German politicians have taken to describing as a "growth locomotive" and "stability anchor" for Europe, has been hit by a barrage of bad news that has surprised even the most ardent Germany sceptics.
The big shocker came on Thursday, when the Federal Statistics Office revealed that gross domestic product (GDP) had contracted by 0.2 percent in the second quarter.
"The euphoria that we've seen, the perception that the German economy is booming is simply misplaced," said Marcel Fratzscher, director of the DIW economic institute in Berlin.
So why is Germany suddenly ailing?
The standoff with Russia over Ukraine has received its fair share of blame in the German media. But that conflict may not hit the economy with full force until the third quarter. It was only last month that Europe stung Moscow with economic sanctions, prompting a tit-for-tat response from Russian President Vladimir Putin.
In reality, economists and some government officials acknowledge, there are deeper reasons for the recent downturn. And they have little to do with the spike in geopolitical tensions in eastern Europe or the Middle East.
They start at home, where Chancellor Angela Merkel's abrupt exit from nuclear energy after the Fukushima disaster in Japan and aggressive push into renewables has unnerved German industry. A recent overhaul of the country's complex renewable energy law has done little to alleviate uncertainty over future policy or assuage fears about German energy competitiveness.
"Energy intensive industries in particular have lost confidence in the future of Germany as a business location," said Thomas Mayer, a former chief economist at Deutsche Bank who now runs the Cologne-based Flossbach von Storch Research Institute. "I think this is a major issue that will burden German industry for years to come."
REFORM ROLL-BACK
Further souring the mood among businesses has been a roll-back of economic reforms that Merkel's predecessor Gerhard Schroeder introduced a decade ago, and which many credit with fuelling a sharp drop in German unemployment and a rebound in growth that began in 2006 - when Germany itself hosted (but failed to win) the World Cup.
Since coming to power in late December, Germany's left-right "grand coalition" government has pushed through a reduction in the retirement age for some workers and won parliamentary approval for a nationwide minimum wage of 8.50 euros(7 pound) an hour. Next on the agenda are stricter limits on temporary workers.
The pension reform, which allows longtime workers to retire four years early at 63, risks aggravating a skilled labour shortage in some sectors of the economy. Ratings agency Moody's said this week that it undermined the sustainability of the German pension system.
The unintended effect of the policies has been to discourage firms from investing at home. Corporate investment in machinery and equipment, for example, hit an all-time low of 6.2 percent of GDP last year, Elga Bartsch of Morgan Stanley points out, despite solid domestic demand dynamics, low lending rates and still-upbeat business sentiment.
Compounding the problem has been pronounced weakness in public investment. A study by the DIHK Chambers of Commerce and Industry last month said Germany was suffering from an overall investment gap amounting to 3 percent of GDP, or 80 billion euros annually.
At roughly 17 percent of GDP, total annual investment levels in Germany lie below those of other industrialised countries, which average over 21 percent. In Germany's southern neighbour Austria, for example, the level is 27 percent.
Pointing to these figures, DIHK President Eric Schweitzer likens the current mood in Germany to that on the Titanic: "Everyone is partying and no one sees the threat of the looming iceberg."
In private, government officials also admit to concern. The Economy Ministry has been examining ways to tackle Germany's investment problem and Minister Sigmar Gabriel has invited outside experts to discuss the matter later this month.
After his Social Democrats (SPD) pushed through the pension and minimum wage legislation, Gabriel is trying hard to show the business community that he is listening. Earlier this month he spent nearly a week touring small-to-medium-sized Mittelstand companies in eastern Germany.
"There have been periods, for example in the late 1990s, when Germany lost its economic edge," said one government official, who requested anonymity due to the sensitivity of the growth debate. "Are we heading into another of these periods? There are people who are concerned that we are."
RUSSIA GAME CHANGER
Germany still looks good compared to European partners such as Italy, whose economy also contracted by 0.2 percent in the second quarter, and France, which admitted this week it would miss its deficit targets for this year after its economy stagnated in the period.
Part of Germany's second quarter weakness can be explained by weather effects: the mild winter led construction firms to invest more heavily in the first three months of the year, at the expense of the recent quarter.
German unemployment, at a rate of 6.7 percent, is near post-reunification lows and wages are on the rise, supporting domestic demand, which has taken over from trade as the economy's main growth pillar.
In contrast to some of its European counterparts, Germany's finances are also in excellent shape.
Data released on Thursday showed total public debt - combining federal and state governments, local authorities and the social security system - fell last year for the first time in the post-war era. The government's 2015 budget contains no net new borrowing for the first time since 1969.
"It doesn't look like we're on the brink of disaster," said Andreas Woergoetter, head of division at the economics department of the Paris-based Organisation for Economic Cooperation and Development (OECD).
Still, economists including DIW's Fratzscher believe the economy will continue to shrink in the third quarter, putting Germany into recession, and deepening concerns about the broader European recovery.
Woergoetter says it would be foolish to dismiss the long-term impact of the Russia conflict, which he believes could be far bigger than bilateral trade ties - Russia makes up only about 3 percent of total German exports - would suggest.
"Whatever comes out of this crisis, it is a game changer because the framework for German-Russian economic cooperation has been seriously damaged," he said.
"Russia was an extremely profitable market. It was an investment opportunity for which there is no replacement and now the strategic plans of many companies will have to be rethought. That too will contribute to the uncertainty in Germany."
(Editing by Jeremy Gaunt)