Edvald Boasson Hagen won stage 19 of the Tour de France as Britain's Chris Froome maintained his overall lead.
The Norwegian was part of a 20-man breakaway but made a winning solo attack late on to finish ahead of Germany's Nikias Arndt in second and Jens Keukeleire of Belgium in third.
It was Boasson Hagen's third Tour stage victory, but his first since 2011.
Team Sky rider Froome crossed the line in Salon-de-Provence over 12 minutes behind the stage winner.
But the three-time champion retains the yellow jersey and will take a 23-second lead over Romain Bardet into Saturday's time trial in Marseille - the penultimate stage - with Rigoberto Uran six seconds further adrift.
Britain's Simon Yates remains in the best young rider's white jersey, with an advantage of two minutes six seconds over nearest rival Louis Meintjes of South Africa.
Edvald picks the right way round
As one of the fastest sprinters remaining in the race, Dimension Data's Boasson Hagen became the favourite to win the stage by riding himself into the breakaway that was finally established after about 35km of the 222.5km route - the longest stage of this year's Tour.
However, instead of waiting for the final sprint, Boasson Hagen, 30, staved off all attempts by his rivals to drop him before riding them off his wheel.
He showed guile as well as power. Only Arndt and Boasson Hagen knew that the right side of a roundabout in the final 3km was the quickest course to take as the others in a nine-man split went left and lost their chance.
Team Sunweb's Arndt flicked out his elbow to implore the rider behind to do his turn, only to discover it was Boasson Hagen, who duly came to the front and kicked clear.
After four podium finishes in this year's Tour - including an agonising photo finish defeat by Marcel Kittel on stage seven - Boasson Hagen finally claimed victory, also ending a six-year wait since two stage wins in a breakout performance for Team Sky at the 2011 Tour.
His win also salvages a difficult tour for Dimension Data, after their leader and sprinter Mark Cavendish abandoned following a crash on stage four.
Stress-free day for Froome
Froome, 32, enjoyed about as close to an entirely stress-free day as is possible on the Tour de France as Team Sky dictated the tempo on the front.
With the likes of Cavendish, Kittel and Arnaud Demare already out of the race, none of the remaining sprinters' teams were likely to receive any help to reel in the breakaway as a tired peloton happily let them build an unassailable advantage.
On an otherwise uneventful day, there was confirmation that Australian Michael Matthews will win the green jersey points classification, provided he completes the two remaining stages.
German Andre Greipel had needed to win all remaining 160 points on offer even to just draw level with Matthews but neither rider scored any points on stage 19.
The time trial awaits
Saturday's stage 20 is a 22.5km individual time trial in Marseille.
If, as expected, Froome remains in the overall lead at the end of day then he will win a fourth Tour title and third in a row on Sunday as tradition dictates no general classification rivals attack the yellow jersey on the final stage in Paris.
Froome, who will go out last, will also likely target victory in the time trial, to avoid becoming only the seventh rider to win the yellow jersey without winning a stage of that year's Tour.
Stage 19 result:
1. Edvald Boasson Hagen (Nor/Dimension Data) 5hrs 06mins 09secs
2. Nikias Arndt (Ger/Team Sunweb) +5secs
3. Jens Keukeleire (Bel/Orica-Scott) +17secs
4. Daniele Bennati (Ita/Movistar) Same time
5. Thomas de Gendt (Bel/Lotto Soudal)
6. Sylvain Chavanel (Fra/Direct Energie)
7. Elie Gesbert (Fra/Fortuneo-Oscaro)
8. Jan Bakelants (Bel/AG2R La Mondiale)
9. Michael Albasini (Swi/Orica-Scott) +19secs
10. Pierre-Luc Perichon (Fra/Fortuneo-Oscaro) +1min 32secs
General classification after stage 19:
1. Chris Froome (GB/Team Sky) 83hrs 26mins 55secs
2. Romain Bardet (Fra/AG2R La Mondiale) +23secs
3. Rigoberto Uran (Col/Cannondale-Drapac) +29secs
4. Mikel Landa (Spa/Team Sky) +1min 36secs
5. Fabio Aru (Ita/Astana) +1min 55secs
6. Dan Martin (Ire/Quick-Step Floors) 2mins 56secs
7. Simon Yates (GB/Orica-Scott) 4mins 46secs
8. Louis Meintjes (SA/Team UAE Emirates) +6mins 52secs
9. Warren Barguil (Fra/Team Sunweb) +8mins 22secs
10. Alberto Contador (Spa/Trek-Segafredo) +8mins 34secs
-- Courtesy of BBC Sport