Rui Costa produced a confident ride up Col de Manse to win stage 16 of the Tour de France as Briton Chris Froome retained his place as overall leader.
Costa climbed the summit and raced home alone to finish 42 seconds clear.
The Movistar rider was part of a 26-man breakaway and the Portuguese moved into the lead with 17km left, holding off the chasing pack to claim victory.
Froome almost came to grief chasing Alberto Contador on the final descent, but stayed upright to finish 29th.
And he is well on course to succeed compatriot Sir Bradley Wiggins as the race winner, with his overall lead remaining at four minutes 14 seconds over his nearest challenger, Bauke Mollema, with Contador third another 11 seconds back.
"That was a little bit of a missed opportunity for Saxo-Tinkoff's two riders, Alberto Contador and Roman Kreuziger, to take some time out of Chris Froome today. But Froome and Richie Porte did a superb job to hold this race together."
"I think Alberto Contador was a little careless to attack like that round the corners," said Froome, 28.
"He went off in front of me and I had to go off and unclip.
"There is never a quiet day on the Tour; if they are not attacking on the climbs, they are attacking on the descents."
Running off into the roadside gravel was a rare moment of drama for Froome, who was expertly marshalled at the front of the peloton by his Team Sky colleagues.
With Spain's David Navarro, who began the day more than 23 minutes adrift in the general classification, the best-placed rider among the early escapees, the British-based outfit could afford to allow the breakaway to stretch clear.
Instead they were focused on maintaining a solid pace and then marking Contador and his Saxo Bank team-mate Roman Kreuziger's late surges on the final climb up the category two Col de Manse.
Sky's resources have been stretched by Edvald Boasson Hagen's withdrawal through injury and
Vasil Kiryienka being timed out on stage eight,
but Britons Ian Stannard and Geraint Thomas did long stints at the front of the main pack, before Richie Porte came into his own late on.
Froome and Contador had to make up ground after running wide late on
The Australian, closely followed by Froome, chased down a succession of breaks by Contador to deliver his team's lead rider over the crest of Col de Manse in contact with the Spaniard.
Contador pushed too hard attempting to pull clear on the final descent, though, leading Froome into trouble in the process.
Both men fell behind Netherlands' Mollema in the incident, but made good their losses by the finish line with the help of Porte.
By that time, Costa's solo break had been rewarded with his second Tour stage win.
French pair Christophe Riblon and Arnold Jeannesson were second and third respectively.
Another home favourite, Thomas Voeckler, and world road race champion Philippe Gilbert were among the breakaway riders who failed to organise quickly enough in the wake of the Portuguese's acceleration.
Results of stage 16:
1. Rui Costa (Por) Movistar 3:52:45"
2. Christophe Riblon (Fra) AG2R +42"
3. Arnold Jeannesson (Fra) FDJ
4. Jerome Coppel (Fra) Cofidis
5. Andreas Kloden (Ger) Radioshack
6. Tom Dumoulin (Ned) Argos-Shimano +1'00"
7. Mikel Astarloza (Spa) Euskaltel +1'01"
8. Philippe Gilbert (Bel) BMC +1'04"
Overall standings after stage 16:
1. Chris Froome (GB) Team Sky 65:15'36"
2. Bauke Mollema (Ned) Belkin +4'14"
3. Alberto Contador (Spa) Saxo - Tinkoff +4'25"
4. Roman Kreuziger (Cze) Saxo - Tinkoff +4'28"
5. Nairo Quintana (Col) Movistar +5'47"