Sales grew by 2.9% on a year-on-year basis, the ONS said, up from just 0.9% in May, and ahead of the 2.7% that had been forecast by economists polled prior to the release.

On a month-to-month basis, growth was 0.6%, compared to an expected 0.4%, the data showed.

"Today's retail sales figures show overall growth. A particularly warm June seems to have prompted strong sales in clothing, which has compensated for a decline in food and fuel sales for the month," Kate Davies, a senior statistician at the ONS said in a statement.

"Looking at the quarterly data, the underlying trend as suggested by the three-month on three-month movement is one of growth, following a fall in quarter 1, suggesting a relatively flat first half of 2017."

On a three-monthly basis, the volume bought increased 1.5% "with increases seen across all store types."

Three-month retail sales movements are generally seen as more reliable than a single month's data, which can be volatile, as June's big jump shows.

Here's the chart showing the overall retail sales trend based on three-monthly data:

ONS

The data may look promising on the surface, but given how good the weather was in June, Samuel Tombs, chief UK economist at Pantheon Macroeconomics argues it should have been stronger.

"The increase in retail sales in June was relatively modest, given the temporary support to demand from the unusually warm weather," Tombs wrote in an email.

"Last month was the fifth warmest June since 1910, and food and clothing sales usually surge when the temperature is unusually high in the summer. Food sales volumes, however, fell by 0.5% month-to-month, while clothing sales increased by only 0.4%."

"Today's fall in inflation is mainly due to drops in petrol and diesel prices. However, the rate remains higher than in the recent past," ONS Deputy National Statistician Jonathan Athow said in a statement.