Retail sales volumes rose 0.7% in October, driven by purchases of long-life food such as tinned goods and UHT milk, the Office for National Statistics (ONS) said. The figures beat some economists' expectations, which had pointed to a slight fall. Sales had declined 0.6% in September.

The ONS linked the increase to the government's emergency preparedness "Be Ready" campaign, which encouraged people to stock up in case severe weather or cyberattacks disrupt essential services. The campaign advised households to keep three days' worth of food and water, along with wet wipes, a torch and cash.

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 also said fuel sales had recovered from earlier low levels, despite pump prices rising again.

Visits to art galleries and clothing purchases also rose in October, according to the ONS.

Jacqui Baker, partner and head of retail at auditing firm RSM UK, said retailers would 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 reported that government borrowing was £17bn in October, slightly below analysts' forecasts of about £18bn but £0.8bn higher than a year earlier. Interest repayments reached £11.2bn, the highest October debt interest figure on record. The ONS said higher inflation pushed up these repayments because payments on index-linked government bonds track the inflation rate. Inflation rose to 3.6% in October, mainly because of higher petrol and diesel prices.