British rider Mark Cavendish won the fifth stage of the Tour de France in a sprint finish on Wednesday, a day marred by two crashes.

While Cavendish earned his 24th career Tour stage win, Australian Simon Gerrans kept the yellow jersey as the race leader. Cavendish remains 26:50 behind Gerrans, who is just ahead of Orica-GreenEdge teammates Daryl Impey and Michael Albasini for the overall lead.

Gerrans managed to avoid both crashes, including one that involved about a dozen riders moments after Cavendish raised his arms in victory.

Thursday’s sixth stage is a 110-mile route from Aix-en-Provence to Montpellier. The race will head into the mountains for the first time on Saturday.