The UK economy picked up speed unexpectedly in the third quarter, according to figures that likely cement expectations that the Bank of England will raise interest rates next month.
Quarterly gross domestic product growth in the UK rose to 0.4% compared with 0.3% growth in the three months to June 2017, the Office for National Statistics said.
A Reuters poll of economists had pointed to growth of 0.3%.
The vast services industry was behind the bulk of Britain's economic expansion in the third quarter, but manufacturing also contributed, helped by a rebound in car production.
Britain performed much better than most economists expected immediately after last year's vote to leave the European Union, and was one of the fastest-growing major advanced economies in 2016.
But it has slipped to the bottom of the pack this year, and while its peers have enjoyed robust growth, Britain posted its worst first-half performance since 2012.
Nonetheless, the Bank of England is widely expected to return rates to 0.5% from 0.25% on November 2 after its next meeting, due to concerns that the economy cannot grow as fast as it used to without generating excess inflation.
"Growth in the third quarter continued at a similar rate as seen in the first half of the year," the ONS said.
The figures will also be a small boost for under-pressure finance minister Philip Hammond ahead of his annual budget on November 22, who has limited room for manoeuvre because of Britain's poor productivity performance.
UK growth in year-on-year terms was unchanged at 1.5% in the first three months of the year, slightly stronger than analysts had expected.
Last month the Bank of England said the preliminary data was likely to show gross domestic product grew by 0.3% in the third quarter.
But growth might be stronger due to improving consumer demand, it said.
The UK's dominant services sector grew by 0.4% in the third quarter, maintaining its momentum from the previous quarter, the ONS said.
Industrial output expanded 1%, its fastest growth in more than a year.
Construction continued to struggle, however, contracting by 0.7% on the quarter - its sharpest fall since the third quarter of 2012.
In August alone, services output increased by 0.2% on the month, offsetting a slight fall in July.
The preliminary estimates of GDP do not include a breakdown of spending, and are heavily based on estimated data.