The pace of German gross domestic product growth slowed a little in the second quarter, but accelerated at its fastest annual rate in three years according to the state statistics authority Destatis.
Demand from households and government increased "markedly", and capital expenditure on machinery, equipment and in construction and other fixed assets rose compared with the first quarter.
The preliminary estimate showed GDP growth rose by 0.6% between April-June compared with the same period last year. This was a shade below expectations of a 0.7% rise and down from the first quarter's upwardly-revised 0.7% growth.
However, it was a strong enough result to help push the annual rate of growth up to 2.1%, Germany's fast rate of growth since the first quarter of 2014.
The rise in domestic demand, however, overshadowed a drop in foreign trade, Destatis reported, saying the price-adjusted quarterly increase in imports was considerably larger than that of exports.
It appears likely, therefore, that the strength of the euro was starting to be felt by exporters, while exchange-rate effects drove an increase in cheaper imported goods.
"The press release from the statistical office confirms our story that domestic demand was the main driver of growth in Q2 – mainly household and government spending – while net exports slowed," said Claus Vistesen at Pantheon Macroeconomics.
With just a month to go to federal elections, the economic signs appear positive for Angela Merkel's ruling Christian Democrat party, and polls point to the CDU coming away with the largest share of the vote.
"With today’s strong growth data, it will be hard for any opposition party to pick out the economy as a main theme for the final stage of the election campaign," said Carsten Brzeski at ING.
He added: "When it comes to the economy, it seems as if Angela Merkel sits in a 'winner-takes-it-all' position."
Germany's growth performance did little to alter the path of the euro, which has moved tentatively lower since the beginning of August. On Tuesday, it was 0.4% in early trade against the dollar and was down 0.3% versus the pound.
The Xetra Dax index of Germany's top 30 stocks was up 0.4% per cent in early trade at 12,217.03.