Greg Van Avermaet won his first stage on the Tour de France on Friday as Peter Sagan finished second for the fourth time this year.
Belgian Van Avermaet won the 198.5km 13th stage from Muret to Rodez at the end of a tough 600m climb to the finish.
But it was yet more heartache for Sagan, who has not won a Tour stage in two years, taking 20 top-five finishes since that last success, as Jan Bakelants was third.
Race leader Chris Froome came home seventh in a group, seven seconds back, alongside all his major yellow jersey rivals.
He leads Tejay Van Garderen by 2min 52sec with Nairo Quintana third at 3min 09sec.
On a baking hot day with temperatures touching 40-degrees Celsius, a six-man breakaway took off early in the stage.
But they were down to just three — Wilco Kelderman, Cyril Gautier and Thomas De Gendt — with 15km remaining.
Having peaked during the stage at four minutes, their lead was just 50 seconds with 10km to go and they were finally caught inside the last 500 metres.
Frenchman Arnaud Demare attacked out of the peloton but ran out of steam as Van Avermaet surged past.
The Belgian had Sagan ideally placed on his wheel and the Slovak looked sure to beat him in the sprint finish.
But Van Avermaet wouldn`t be denied and when Sagan tried to come past, the Belgian just dug in harder to take the greatest win of his career.
Like Sagan — second nine times since his last Tour stage win — Van Avermaet had many times narrowly missed out on important wins.
Third in Paris-Roubaix earlier this year having finished fourth in 2013, third also at the Tour of Flanders in April having finished second last year, the 30-year-old now has a major win to his name.
For Sagan there was one consolation — he held onto his green points jersey having lost it, virtually, on the road after the intermediate sprint to Andre Greipel.