Image copyright Getty Images

The UK economy grew by 0.7% in the three months to August, buoyed by the hot summer, the Office for National Statistics said.

But the ONS said that in August, GDP growth was flat. Economists had predicted 0.1% growth.

The three-month measure was the fastest pace of growth since February 2017, economists said.

The ONS's head of GDP, Rob Kent-Smith, said the economy had "continued to rebound strongly after a weak spring".

He said retail, food and drink production and house building had all performed particularly well during the hot summer months.

"However, long-term growth continues to lag behind its historical trend," Mr Kent-Smith added.

The ONS has introduced monthly measures of GDP and provides three-month rolling growth figures, rather than the quarterly figures it published in the past.

Andrew Wishart, UK economist at Capital Economists, said the three-month 0.7% figure was higher than the 0.6% expected because of upward revisions to earlier data.

Data last month had shown the economy grew by 0.3% in July. The latest figures revised this up to 0.4% and the figure for June was also revised upwards.

"Rolling three-month growth in the services and construction sectors eased compared to July, but this was offset by industrial production recovering from its recent contraction," Mr Wishart said.

Analysis:

By Simon Jack, BBC business editor

A three month growth rate of 0.7% looks pretty darn good for an economy generally forecast to grow somewhere between 1% and 1.5% for the whole year.

But as always, there is some salt to be pinched.

The three-month figure continues to be flattered by a strong showing from construction in June and July, caused by a bounce-back in activity after a weather-affected beginning of the year.

Next month, June's strong performance from production, construction and manufacturing will drop out of the rolling three-month calculation.

The figures also show that the UK economy did not grow at all in August.

Now that is not the end of the world, as it means the economy didn't shrink after a strong June and July.

In summary, it looks like the UK economy is on track to record a pretty good third quarter, but there will be no sound of corks popping in the Treasury.

The ONS said that growth was picking up from April, when data for the first quarter of the year was showing the weakest growth since 2012, only partly because of the cold weather.

The UK then had a heatwave, which the ONS has said helped to fuel growth in the retail sector.

Taking a longer-term view, the ONS said growth in the services sector - which makes up 80% of the economy - was subdued when compared with the same three months a year earlier.

According to the ONS:

Monthly growth in the services sector was flat, while grew over the three months.

Monthly growth in production was 0.2%, although within that, manufacturing shrank by 0.2%. Over three months, production growth was 0.7%.

The construction sector shrank by 0.7% in August, but grew by 2.9% on the three-month measure.

Lee Hopley, chief economist at EEF, the manufacturers' organisation, said: "The main takeaway from today's bumper crop of releases on the economy is that the UK saw a spurt of activity in June and July not seen since the end of 2016. Beyond that, it seems that it's back to business as usual more or less in August.

"The underlying services picture looks to be slow and steady, the construction sector has recovered its weather-related losses from earlier in the year and manufacturing weakness is persisting in the second half of this year so far," Ms Hopley said.

John Hawksworth, chief economist at PwC, said the economy was on track for an annual growth rate of 1.5%. "This is somewhat below its longer-term trend rate of around 2% and reflects the continued drag on business investment, in particular from Brexit-related uncertainty," he said.