Retail sales of clothing in the UK recorded their strongest growth in well over two years in May and were similarly buoyant online, according to new figures.

The BRC/KPMG Retail Sales Monitor showed UK retail sales edging up 0.5% on last year on a like-for-like basis, with total sales up 2% – but a price war in the food sector masked good growth for non-food categories.

Clothing was the best-performing category, recording its highest growth since December 2011, and helping online non-food sales to surge up 17% in May.

The British Retail Consortium said warmer weather had induced a “step-change” in the mood of clothing shoppers, with all segments performing well, led by women’s wear.

Casual jerseys and printed trousers also did well, together with branded fashion – although the overall performance was flattered by soft comparatives with last year.

Footwear was the second-best-performing category, with seasonal ranges selling well across all segments, including wedges, flip-flops, sandals and canvasses, and children’s school shoes also experiencing good demand.

Clothing recorded its highest growth in online sales since Christmas, while footwear had its best month since December 2012.

“Britain’s fashion retailers are leading the way in developing their digital offering for discerning customers and that is really paying off in resulting sales figures,” said Helen Dickinson, BRC director general.

“Footwear is telling a similar story, where great websites and good online service have led to the second-highest proportion of footwear sales online ever recorded by our monitor.”

Clothing was the second largest contributor to non-food online sales growth, with the proportion of clothing sales online up to 26%, the highest penetration rate on record.