Brussels warned against complacency on Wednesday as the troubled eurozone finally returned to growth, after 18 months stuck in a double-dip recession.

Olli Rehn, Europe's economic commissioner, welcomed news that the 17 nations using the single currency had expanded collectively by 0.3% in the three months to June – the first pickup in activity since the autumn of 2011.

But Rehn said celebrations should be put on hold, given Europe's jobs crisis and the wide disparity in economic performance between different countries in the eurozone.

"Yes, this slightly more positive data is welcome – but there is no room for any complacency whatsoever," Rehn said. "I hope there will be no premature, self-congratulatory statements suggesting the crisis is over, for we all know that there are still substantial obstacles to overcome. The growth figures remain low and the tentative signs of growth are still fragile."

Rehn said the average number for the bloc hid substantial differences between states, with Germany's performance outstripping those of Spain and Italy, which remained in recession. He added that some member states still had unacceptably high unemployment rates, with economic reforms still in their infancy, leaving the region with a "very long way to go".

"A sustained recovery is now within reach, but only if we persevere on all fronts of our crisis response: keep up the pace of economic reform, regain control over our debt, both public and private, and build the pillars of a genuine economic and monetary union," he said.

Figures released by Eurostat, the EU's statistical agency, showed that a stronger than expected performance by the single currency's two biggest economies – Germany and France – helped haul the eurozone out of recession. Financial markets had been expecting a rise in eurozone GDP following the increase in industrial production reported on Tuesday, but were surprised by news that Germany grew by 0.7% in the second quarter and France by 0.5%.

Along with the rest of the world, the eurozone fell into a deep slump in the winter of 2008-09 before recovering in 2010 and early 2011. But a second leg of the downturn then began as a result of the eurozone's sovereign debt crisis, which hit confidence, led to a mothballing of investment and resulted in the imposition of hardline austerity programmes.

Despite the growth in the second quarter, the European commission still expects the eurozone to suffer a second full calendar year of falling output in 2013, with growth resuming in 2014.

Eurostat's figures showed that Italy and Spain – the single currency's third and fourth biggest economies – both remained in recession in the second quarter of 2013. Spain's economy shrank by 0.1%, while Italy posted a 0.2% decline.

The Dutch economy also contracted by 0.2% but Portugal – one of the three countries that required a financial bailout – recorded the fastest expansion of any eurozone country, with 1.1% quarterly growth.

Torben Kaaber, chief executive of Saxo Capital Markets, said: "So the eurozone is finally out of recession. While this wasn't entirely unexpected, the strength of the growth in the second quarter, 0.3%, was. The growth was primarily driven by the German economy, which grew 0.7% on the back of increase in domestic private and public consumption. This will provide a welcome boost to Chancellor Merkel in the runup to the German elections; however, critics will point to the continuing underperformance of southern Europe, and to Greece and Italy in particular, and argue that a few select countries cannot continue to hold up the common market. As the value of the euro climbs today, the jubilation will be short-lived, as the consistent problem of the southern neighbours will weigh on the minds of investors."

Dario Perkins of Lombard Street Research said Germany would continue to be crucial to the eurozone's recovery, adding that there were signs of consumer spending and investment picking up. "But the French contribution to this recovery is likely to sag, thanks to its labour market which is still in a horrible state. Unemployment has surged over the past two years and the demand for labour has collapsed, with the level of job vacancies at multi-decade lows. Without France rediscovering its 'va-va-voom' and with the rest of the Mediterranean countries struggling with too much debt, Germany is still the euro area's only bright spot."

David Brown of New View Economics said: "It is a tale of two very different economies. Germany is doing all the hard work in the vanguard of strong recovery as its 0.7% second-quarter GDP expansion showed. On the other side of the equation, the troubled eurozone economies are still mired down in the mud of deep recession risk."

• The standfirst of this article was amended on 16 August 2013 to correct the spelling of Olli Rehn's name.