Shares in London closed tonight at their highest level this year after an unexpected return to growth in Germany and France – the eurozone's two powerhouse economies – boosted hopes of recovery from the severest financial crisis since the 1930s.

The City's FTSE 100 closed 38.7 points up at 4755.46 – a level not seen since early October when bourses around the globe were gripped by panic in the aftermath of the collapse of Lehman Brothers.

Both Germany and France reported that output had grown by 0.3% in the three months to June – bucking market fears of a fresh contraction in activity and far exceeding the performance of the UK, which contracted by 0.8% over the same period.

Opposition parties in the UK were quick to seize on the contrast between the UK and its two main European rivals, which were boosted by a better trade performance and the success of the "cash for clunkers" scheme to encourage consumers to buy new cars.

Shadow chancellor George Osborne said: "It is great news that we are beginning to see some signs of recovery in France and Germany, not least because these are key export markets for British companies. It is striking that the economic data for the same period for Britain has shown a continuing sharp contraction in recession.

"Once again, Gordon Brown's claim that Britain was better prepared for recession, and would weather it better than other countries, has been proved untrue."

Vince Cable, the Liberal Democrat shadow chancellor, said: "The signs of recovery in France and Germany are to be welcomed, particularly since they are both vital markets for British goods and services.

"The size of Britain's banking sector and the extent to which the government allowed debt and the housing bubble to grow left Britain particularly exposed. This was not the case in either France or Germany."

Share prices had shown even heftier gains earlier in the day but these were reduced after disappointing figures for jobs and retail sales in the US dampened economic recovery hopes. Oil prices, which had touched $72 a barrel following the upbeat news from Berlin and Paris, also lost some of their gains.

Despite the return to growth of Germany and France for the first time since early 2008, weak performance by other European countries – including Belgium, Italy and the Netherlands – meant that output in the 16-nation eurozone slipped by 0.1% in the second quarter, according to Eurostat, the European Union's statistics office. Analysts had been braced for a fall of 0.3% in gross domestic product in both Germany and France.

The figures showed that the German recovery was led by increases in private and public consumption alongside construction. Despite a slump in exports, trade made a positive contribution to growth as imports fell at a faster pace.

Similarly, the French recovery was boosted by a 0.3% rise in consumption, following a 0.2% rise in the previous quarter. French economy minister Christine Lagarde said that government car scrappage schemes and falling prices, particularly among big retailers, were encouraging consumers to spend. She added there was no danger of deflation taking hold.

Exports contributed 0.9 percentage points to growth in France. Strong public sector investment also fuelled the recovery, while investment by private companies remained weak, Lagarde said.

"There is a more than decent chance that eurozone economic activity has now hit a bottom and will expand again in the third quarter, as many other eurozone economies follow Germany and France out of recession," said economist Martin van Vliet at ING.

"However, we fear that the recovery will be relatively slow and protracted. The eurozone's worst postwar recession may be drawing to a close, but for many people and businesses it will continue to feel like a recession for some considerable time to come."

Despite the return to growth on a quarterly basis, Germany's economy remains weak. Compared with a year ago, it shrank by 7.1% in the second quarter. Angela Merkel's government expects it to contract by some 6% this year.