The UK economy has bucked expectations of substantial slowdown in the three months after the Brexit vote thanks to a "strong performance" from the powerhouse services sector.
The Office for National Statistics (ONS) said gross domestic product (GDP) grew by 0.5% in its first estimate of third-quarter growth, down slightly from 0.7% in the second quarter.
Economists had been pencilling in a steeper fall of 0.3%.
The ONS said there was little evidence of a "pronounced" impact on the UK economy in the immediate fallout of the EU referendum result.
The higher-than-expected GDP figure was driven by the services industry, which grew by 0.8% between July and September.
The boost came from a robust performance from film and TV production, while the release of Ghostbusters, Jason Bourne, The BFG and Star Trek Beyond helped bolster box-office receipts in July.
Chancellor Philip Hammond said the GDP figures show the UK economy is resilient and its fundamentals are strong.
"We are moving into a period of negotiations with the EU and we are determined to get the very best deals for households and businesses," he added.
"The economy will need to adjust to a new relationship with the EU, but we are well-placed to deal with the challenges and take advantage of the opportunities ahead."
Services growth was also lifted by transport, storage and communication, which grew at its fastest pace since the fourth quarter of 2009, rising 2.2% over the period in contrast to 0.6% in the second quarter.
It helped to offset the steepest fall in construction since the third quarter of 2012, with the industry dropping 1.4% between July and September this year after a slide in new housebuilding.
Manufacturing dropped by 1% in the third quarter, while production fell 0.4% and agriculture declined by 0.7%.
Separate figures for the services sector, which accounts for more than 78% of the UK economy, showed that output grew by 0.2% between July and August.
ONS chief economist Joe Grice said the data provided the "most comprehensive picture so far of the post-referendum UK economy", reflecting information from more than 37,000 UK firms.
"While quarterly growth has fallen slightly, the economy has continued to expand at a rate broadly similar to that seen since 2015 and there is little evidence of a pronounced effect in the immediate aftermath of the vote," he added.
"A strong performance in the dominant services industries continued to offset further falls in construction, while manufacturing continued to be broadly flat."
The UK economy's surprise resilience in the third quarter will cast doubts over the Bank of England moving to cut interest rates next week.
In August, the Bank slashed rates and unleashed an economy-boosting package worth up to £170 billion, warning that even after its sledgehammer action, third-quarter growth would almost flatline at around 0.1%.
A surprisingly hardy performance from the economy since then saw the Bank upgrade its growth forecast in September to between 0.2% and 0.3%, but it still said another rate cut was on the cards by the end of the year.
Ben Brettell, senior economist at Hargreaves Lansdown, said the third-quarter performance will "pour cold water" on the chances of a rate cut next month.
He said it was "difficult to interpret today's figures as anything other than very good news for the UK economy", he added.
"Some will be concerned about the absence of any rebalancing of the economy away from the ever-dominant services sector, which grew 0.8% while everything else contracted.
"However, I don't see this as a problem. In an increasingly global economy, individual countries need to specialise in industries where they have a comparative advantage."
The pound rose to 1.226 against the US dollar immediately after the growth figures were announced before retreating to a 0.1% fall to 1.222.
Sterling has sunk more than 20% against the US dollar since Britain voted to leave the European Union.