Fears of a marked slowdown in the British economy in the run-up to the EU referendum appeared to be overdone.
New data shows output between April and June rose by 0.6% against an expectation of 0.4%.
The GDP figure, which equates to an annual growth of 2.2%, was welcomed among analysts and other analysts.
The markets responded positively with the FTSE 100 index closing up 0.39% or 26.4 points at 6,750.43 after touching 6,757.96, its highest since last August. It is up more than 16% from its post-Brexit slump.
However, a CBI survey revealed that retailers suffered their sharpest fall in sales in four years, raising doubts about the ability of consumers to stave off a Brexit recession.
It said sales fell sharply between 28 June and 14 July and retailers cut orders with suppliers by the most since the 2008-09 financial crisis.
Commenting on the ONS figures, Martin Beck, senior economic adviser to the EY ITEM Club, described the data as “the best out-turn for four quarters”. However, he cautioned that the softening could be still to come.
“GDP growth in Q2 looks likely to represent one last hurrah for the economy before it enters a softer and more turbulent period,” he said. “The lack of momentum as the economy entered Q3 means that the chances of a negative reading for the current quarter are relatively high.
“However, our view remains that the extent to which the economy will slow in the second half of the year has been overplayed and that the UK may avoid a technical recession.”
Joe Grice, chief economist at the Office for National Statistics, said “any uncertainties in the run-up to the referendum seem to have had a limited effect”.
He added that “very few” respondents to the ONS survey cited Brexit uncertainty as having had an impact on their business.
GDP was boosted by strong retail figures and manufacturing, especially cars and pharmaceuticals. Agriculture and construction were both marginally down, but they are smaller sectors of the economy, so their impact was lower.
It’s worth pointing out that these growth figures run to the end of June and thus only include one week of post-Brexit activity.
Ben Brettell, of Hargreaves Lansdown, said: “It’s always difficult to tell where you’re going by looking in the rear-view mirror. Today’s GDP figures can’t be taken as evidence of the current climate.
“However, what they do show is an absence of pre-Brexit concerns, meaning that if the forecast downturn does materialise, at least we start from a position of relative strength.”
Mr Brettell warned that gloomy sentiment can make a recession a self-fulfilling prophecy, but he said the data showed that things might not turn out as bad as the doom-mongers predicted before the vote.
GSK’s investment in the UK, announced today along with encouraging figures from housebuilder Taylor Wimpey will help reinforce a view that Britain can avoid a severe setback from the Brexit vote.
Chancellor Philip Hammond said: “Britain is open for business – as we enter a period of adjustment, I’m confident we have the tools to manage the challenges ahead.”