Retail sales volumes rose 0.7% in October, driven by purchases of long-life food such as tinned goods and UHT milk, according to the Office for National Statistics (ONS). The ONS said the increase followed the government's emergency preparedness "Be Ready" campaign, which encouraged people to stock up in case severe weather or cyberattacks disrupt essential services.

ONS chief economist Grant Fitzner said: "Supermarkets have told us that sales of long-life food items such as tinned food and UHT milk were boosted by the government's 'Be Ready' campaign." He added: "Meanwhile fuel sales have been recovering from earlier low levels, despite pump prices rising again."

The rise beat some economists' expectations, which had predicted a slight fall. It followed a 0.6% decline in September. Visits to art galleries and clothing purchases also increased in October.

The government campaign advised people to keep three days' worth of food and water at home, along with wet wipes, a torch and cash. Separate research released last week, cited by the BBC, suggested households were stockpiling essentials but not panic buying. Data from Worldpanel by Numerator indicated people were buying tinned meat, bottled water and hand sanitiser.

Jacqui Baker, partner and head of retail at RSM UK, said: "retailers will want to see out the year with some Christmas cheer before consumers batten down the hatches in the New Year as energy costs skyrocket and inflation ramps up further."

Separately, the ONS said government borrowing was £17bn in October, slightly below analysts' forecasts of about £18bn and £0.8bn higher than a year earlier. Interest repayments reached £11.2bn, the highest October figure on record. Inflation rose to 3.6% in October, mainly due to higher petrol and diesel prices.