The UK economy grew by 0.6% in the three months to September, with warm weather boosting consumer spending, the Office for National Statistics said.
The figure for the third quarter is in line with predictions from the Bank of England and other forecasters.
However, buoyant growth in July was offset by a slowdown in August and September.
It is the highest quarterly growth figure since the fourth quarter of 2016, when the economy grew 0.7%.
Analysts warned the economy had “little underlying momentum” and growth would decline in the final three months.
The ONS also issued a separate monthly figure for September, which, like the previous month, showed zero growth.
Services, which make up three-quarters of the economy, only grew by 0.3% in the three months to September.
After a slow start to the year, construction activity grew by 2.1% in the quarter. Manufacturing also picked up after a slow second quarter, thanks to strong car manufacturing numbers for the quarter.
Household spending grew by 0.5% in the quarter, but business investment shrank by 1.2%, suggesting uncertainty among companies over the effects of Brexit.
Business investment had been expected to rise by 0.2%, according to forecasts. It has now contracted for three quarters in a row.