The UK economy picked up in the first three months of the year after manufacturers' stockpiling ahead of Brexit helped to boost growth.
Growth was 0.5% in the quarter, up from 0.2% in the previous three months, the Office for National Statistics said.
The manufacturing sector grew at its fastest rate since 1988 in the period.
The ONS said this was driven by manufacturers rushing to deliver orders before the original Brexit deadline of 29 March.
Pharmaceuticals was one of the sectors most affected, expanding 9.4% between January and March.
Previous business surveys had shown manufacturers stockpiling goods for Brexit in case the UK left the EU without a transition deal, which they feared could lead to delays at UK borders.
What impact has Brexit had on the figures?
As well as manufacturers rushing to deliver orders before the UK was due to leave the EU, firms also stockpiled parts.
This drove a surge in imports, with the total trade deficit - the gap between what the UK imports and exports - doubling in the first quarter to a record high, separate data from the ONS showed.
The total trade deficit widened from £8.9bn to £18.3bn, driven partly by a sharp increase in imports of cars and gold.
However, the UK's deadline to exit the EU has since been extended until the end of October after Prime Minister Theresa May asked the EU for more time to negotiate a deal.
Is the economy stabilising?
Chancellor Philip Hammond said the figures showed the economy remained "robust".
"These GDP figures this morning show again that the UK economy is performing robustly, despite the evidence of slowing global growth and the continued Brexit uncertainty at home - so it's good news," he told the BBC.
But analysts have warned the impact of Brexit could mean the pick-up in growth is short-lived.
Tej Parikh, senior economist at business lobby group the Institute of Directors, said it could well be just "a flash in the pan".
"Some businesses brought activity forward early this year in preparation for leaving the EU, so higher stocks and earlier orders have artificially bumped up the growth numbers.
"In the second quarter, many firms will be keen to run down their Brexit caches, which will drag on economic growth," he said.
But Ruth Gregory, senior UK Economist at Capital Economics, said the figures offered some "encouraging signs that underlying growth gained some pace".
She said household consumption growth was "solid" and pointed out that business investment grew "for the first time in four quarters".
What do the trade figures tell us about the economy?
There's something upbeat in today's figures and also something downbeat, quite possibly with the same cause.
In spite of all the political fuss, the economy grew better than it has in a while. At 1.8% for the year, it is almost at pre-financial crisis rates, when growth of 2-3% a year was normal.
The figures can be taken to confirm predictions that there would be a boost to economic growth from "stockpiling" - firms spending more than usual building up their stocks of supplies, just in case a no-deal Brexit meant cross-border trade seized up.
Manufacturing enjoyed a boost and more cars were imported than usual. You can't tell from these figures alone, but that may also be due to stockpiling: a "buy-now-while-stocks-last" effect in case the pound dropped (making imported cars more expensive) and tariffs were imposed (ditto).
But here's the downer. Partly due to higher imports, the trade deficit doubled, from £8.9bn to £18.3bn. Because we enjoy a surplus in services, exporting more than we import, it looks even worse when you strip out services.
The trade in goods deficit in the first quarter widened to a record: £43.3bn including non-monetary gold, which rose by £6bn.
We know from numerous economic studies: people buy gold when they're worried. It looks like, in the first quarter of the year, economic growth was lifted - by anxiety. It's small, but you might call it a mini "worry-boom".