* Gov't spending helps economy for first time since end 2009
* Retail sales rose 0.1 pct in July, below expectations
BRUSSELS, Sept 4 (Reuters) - A rebound in exports and a return to spending by households and governments pulled the euro zone out of recession in the second quarter of this year, data showed on Wednesday, in the first signs of recovery after the bloc's longest slump.
Stronger-than-expected growth from Germany to Portugal helped the euro zone's economy expand 0.3 percent in the April-to-June period, the European Union's statistics office Eurostat said in its first breakdown of the data.
Exports to the rest of the world rose sharply in the quarter after six months of falling sales, while government spending made its first positive contribution to the economy since late 2009 when Greece plunged the euro zone into its debt crisis.
The softening of the austerity policies that many economists blame for worsening the euro zone's longest ever recession was also accompanied by the first quarterly rise in household spending since late 2011.
Cuts in public sector spending from education to health aimed to curtail budgets that ballooned during the boom of the euro's early years, but record unemployment has meant Europeans are buying less and forcing companies to cut output and staff.
The euro zone's fragility was evident in the muted shopping of Europeans during July, when retail trade volumes increased just 0.1 percent, Eurostat said in a separate release.
That was not enough to make up for the 0.7 percent fall in June and was below economists' expectations for a 0.4 percent increase in the month.
Economists now expect economic growth to continue in the third quarter of this year following positive business surveys in August, but there are few hopes of a rapid recovery.
"We do not interpret a second consecutive solid gain as the start of a strong upturn," said Christoph Weil, an economist at Commerzbank. "After all, the imbalances in the periphery have yet to be fully corrected and several core countries are increasingly facing problems," he said in a report.