LONDON-British retail sales unexpectedly edged up in July, helped by the strongest growth in online spending in three years, as consumers continued to support the economy before the Oct. 31 Brexit deadline.

Monthly retail sales volumes rose 0.2% after a 0.9% surge in June, the Office for National Statistics said on Thursday, beating the average forecast for a 0.2% decline from a Reuters poll of economists.

Compared with July 2018, sales were up 3.3%, slowing from 3.8% in June but at the top end of forecasts. Britain’s economy contracted in the second quarter, a hangover from stockpiling before the original March 29 Brexit deadline, despite solid growth in household spending.

Thursday’s data suggested consumers continued to take Brexit in their stride, helped by modest inflation and wages growing at their fastest rate in 11 years.

That has aided the world’s fifth-biggest economy at a time when many companies have cut investment because of growing uncertainty about Brexit.

Sterling showed little reaction to Thursday’s data, which contrasted with a British Retail Consortium survey that showed spending fell in the year to July at the fastest pace on record for that month. “Retailers won’t be getting carried away by these (ONS) figures,” Karen Johnson, head of retail at Barclays Corporate Banking, said.

“They will continue to be mindful of the looming Brexit threat and potential impact on their international supply chains, with possible cost increases and price rises on the horizon.”