Cedric Vasseur became the first French rider to win at this year’s Tour de France, sprinting to victory in the 10th stage in the last year of his career.
However, Denmark's Michael Rasmussen kept the overall lead by finishing safely in 30th place.
Rasmussen is 2:35 ahead of Alejandro Valverde and 2:39 in front of Iban Mayo in third.
Vasseur, who rides for the Quick Step team, narrowly outsprinted four other cyclists in a breakaway group to cross in 5 hours, 20 minutes, 24 seconds.
It was his first win at cycling's biggest race since 1997.
Vasseur beat fellow Frenchman Sandy Casar by centimeters to cross the finish line, while Swiss rider Michael Albasini was third.
Vasseur, Casar, Albasini and two other cyclists finished in the same time.
Rasmussen was 10:36 behind Vasseur.
Vasseur, who turns 37 in August, says this year will be his last in the sport.
"I think I can leave cycling with my head held high," he said.
"I am happy to offer France the first win on the Tour."
Wednesday's 229.5-kilometre 10th stage took the Tour from Tallard to Marseille.
Vasseur was the third Quick Step rider to win a stage this year.
Gert Steegmans won the second stage and Tom Boonen took the sixth.
In the finishing straight, Vasseur appeared to take the four other riders
by surprise when he sprinted past them by riding close to the barriers on one side.
"I didn't make many tactical mistakes, I rode well," Vasseur said.
"I took advantage of a little hole that opened up on my right, then I had to push right up to the line."