(CNN) -- Thomas Voeckler won the fifth stage of the Tour de France as Lance Armstrong remained in second place in the overall standings behind Switzerland's Fabian Cancellara.
Vockler raises his arms in triumph with the bunch coming up fast behind.
It was a hugely popular victory for one of the heroes of French cycling, who had been part of a six-man breakaway group for much of the 196.5 km stage from Cap d'Agde to Perpignan.
The 30-year-old Bouygues Telecom rider achieved cult status when he held the yellow jersey for ten days in the 2004 Tour de France and used his experience to good effect in the closing moments on Wednesday.
With the peloton closing fast, Voeckler burst clear of his breakaway rivals and stayed away by seven seconds, pumping the air with joy when he realized he was going to win his first Tour de France stage.
Mikhail Ignatiev of Team Katusha, who had been in the breakaway, just held off the chasing bunch for second place, edging third-placed Mark Cavendish, who increases his lead in the race for the green jersey but will be disappointed to miss out on a third stage victory of this year's Tour.
Cancellara finished comfortably in the main bunch to retain the yellow jersey ahead of Armstrong whose Astana teammate and Tour favorite Alberto Contador remained in third place, 19 seconds behind the leading pair.
It proved another dramatic day as the peloton continued its journey down the coast, with crosswinds again a factor.
As the pace went up to catch the breakaway group, the bunch split into two groups with Cancellara driving powerfully up front.
Contador, who had been caught in a similar break on Monday to lose time on Armstrong, this time managed to stay in the front group with the other leading contenders.
Voeckler's win was particularly welcome for the Bouygues Telecom team, who suffered a major embarrassment when four of their riders went off the road and into a ditch in Tuesday's team time trial.
Thursday's sixth stage sees riders go from Girona to Barcelona, the 181-5 km stage finishing on the spectacular Montjuic climb in Catalan city.