British shoppers spent more than expected last month as many were enticed by online shopping promotions, despite a weaker picture recently as households battled the highest inflation in more than 40 years, official figures showed on Friday.

Retail sales volumes, adjusted for inflation and the time of year, rose 0.3% on the month in July after a downwardly revised drop of 0.2% in June, the Office for National Statistics said.

Sales have fallen by 1.2% over the past three months and were 3.4% lower than a year ago.

Economists polled by Reuters had forecast a 0.2% monthly drop in sales volumes and a 3.3% annual fall.

"Online sales did pick up this month, as retailers told us that sales were boosted by a range of offers and promotions. However, fuel sales fell with some evidence suggesting the very hot weather meant fewer people travelling," ONS statistician Darren Morgan said.

Amazon held its annual Prime Day promotion last month, which in previous years has coincided with an uptick in British retail sales, although the ONS said greater spending was recorded by a range of online retailers, especially for household goods.

However the longer-term trend for sales was downward, the ONS said, and the Bank of England has warned that high inflation is likely to tip Britain into recession later this year.

Consumer price inflation jumped to an annual rate of 10.1% in July, its highest since 1982, from 9.4% in June, driven by an increase in food prices on top of previous sharp rises in household energy bills.

A GfK consumer survey earlier on Friday showed households were "exasperated" by the surging cost of living, and that their sentiment was the weakest since the series began in 1974.

Supermarkets have previously reported shoppers switching to cheaper products, and frozen food chain Iceland earlier this week said it would give interest-free loans of up to 100 pounds ($119) to its poorest customers.

($1 = 0.8398 pounds)