By Don Nico Forbes

Eurozone retail sales rebounded in May, highlighting a brighter outlook for consumer demand despite lingering uncertainty from the conflict in the Middle East.

Retail sales volumes rose 0.2% on month, following a 0.3% decline in April, according to data published Monday by the European Union's statistics agency Eurostat.

Economists polled by The Wall Street Journal had expected a rise of 0.3%.

The increase was driven by stronger sales of food, drinks and tobacco, as well as non-food products excluding automotive fuels. Volumes of automotive fuels inched down 0.5% after tumbling by 3.6% in April, Eurostat said.

After a weak few months following the outbreak of the war in Iran and a jump in energy costs, consumer confidence has shown tentative signs of improving in the eurozone.

The rise in May sales suggests consumers kept on spending despite the drop in confidence and real incomes over the second quarter, said Jack Allen-Reynolds, deputy chief eurozone economist at Capital Economics.

"It also reinforces our view that the impact of the jump in energy prices on eurozone GDP would be very small," he added.

Sentiment edged higher in June after falling to a three-year low in April in the wake of the conflict. The recovery coincided with a retreat in oil and natural-gas prices as tensions between the U.S. and Iran eased, reducing pressure on household budgets and improving the outlook for consumer spending in the second half of the year if energy prices remain contained.

The eurozone labor market has also remained resilient, with the unemployment rate holding at a record low of 6.2% in May, supporting household incomes despite broader economic uncertainty.

Even so, many households continue to face pressure on their finances. Economists expect wage growth to moderate this year, while recent price increases have eroded part of the gains in purchasing power, leaving consumers cautious about discretionary spending.

"The pick-up in inflation [means] that the level of real household disposable income is likely to have declined in 2Q," Allen-Reynolds said.

Inflation slowed to 2.8% in June from 3.2% in May as energy prices eased, but it remains above the European Central Bank's 2% target. Speaking at the ECB's annual forum in Sintra, Portugal, last week, Christine Lagarde said that last month's interest-rate increase reflected staff projections showing inflation remaining above target through 2028.

Still, with energy prices falling rapidly in June, real incomes are expected to return to growth in the third quarter, Allen-Reynolds said.

"Any weakness in overall household consumption is likely to prove short-lived," he said.

Write to Don Nico Forbes at don.forbes@wsj.com