Team Sky's Chris Froome remains the Tour de France leader after holding off several attacks by second-placed Nairo Quintana as Germany's Simon Geschke won stage 17 in the French Alps.
Giant's Geschke broke free with 50km left of the 161km stage.
Earlier, American Tejay van Garderen, third in the general classification, was forced to retire through illness.
Froome leads Colombian Quintana by three minutes 10 seconds with Britain's Geraint Thomas now fourth overall.
Team Sky rider Thomas improved his position after Van Garderen's withdrawal and a late mechanical problem for Spaniard Alberto Contador, who started the day fifth and slipped to six minutes 40 seconds off the leaders' pace.
After the end of stage 17, which climbed 161km through the Alps from Digne-les-Bains to Pra Loup, Spain's Alejandro Valverde is now third, while Thomas is six minutes 34 seconds behind Froome.
Geschke goes for glory
Geschke, 29, recorded his first stage victory in any Grand Tour race and it was the fifth stage won by a German rider in this year's Tour de France.
Thought of as a domestique for team-mate John Degenkolb, Geschke pulled away on the category-one climb up Col d'Allos.
Frenchman Thibaut Pinot suffered a fall in the subsequent descent, as he tried to pull back the leader, and American Andrew Talansky made a late attempt for the win but finished 32 seconds behind.
"I came as a helper for John but knew I could go for my own chances and today was that day," Geschke told ITV4.
"I didn't feel great this morning. I was going with the flow and suddenly I was in a bigger group and thought I'd give it a try. I hope Germany is proud."
Froome frustrates Quintana
Today's stage may have been Quintana's best chance yet of making up time on 30-year-old leader Froome, with just three stages remaining before Sunday's procession into Paris.
The pair formed a group on the final ascent to Pra Loup, alongside fellow GC contender Vincenzo Nibali, with Quintana joined by Movistar team-mates Valverde, Adriano Malori and Jose Herrada.
|Analysis: BBC Sport's Matt Slater|
|"Nairo Quintana rolled over to Chris Froome at the finish line and shook his hand.|
|"It was a sporting gesture from one great competitor who had thrown everything at another great competitor who had resisted every blow.|
|"It was not, however, a surrender. Quintana and his Movistar team gave Froome and Team Sky a taste of what is to come over the next three days and it was brutal.|
|"Froome had all the answers today, and looks increasingly like our winner, but he knows if he drops his guard once, overshoots a corner, misses a feed or gets isolated early on, Quintana will be there to hit him hard."|
Quintana, 25, held the numbers advantage, and attempted to break away in the final stretch, but Froome kept in contact and although last year's young rider winner was victorious in their mini sprint for the line, the gap between the two remains the same.
"Quintana is still pushing me and testing me,"
"In that last kilometre he was pushing on to see if I could respond. I'm feeling alright and just hoping to stay on my bike the next few days."
"He's running out of opportunities," said Froome, who shared a handshake with his rival at the finish.
"There's only three more stages left to race. They're really tough stages.
"Definitely getting the feeling it's an all or nothing approach at this stage in the race."
Geraint gains, Contador falls
Welshman Thomas is having a tremendous Tour, and despite a hideous crash on Monday, which saw him hit a telegraph pole, he once again displayed his team-leading potential.
The Team Sky rider came in eight minutes 18 seconds behind Geschke, and two minutes two seconds behind Froome, but was propelled up to fourth from sixth in the GC.
That was partly down to Van Garderen's retirement through illness, with the American sadly having to end a promising campaign and give up in his pursuit of a podium finish.
But also a late crash from Contador, and his subsequent problems with his chain, meant the Spaniard lost two minutes on his yellow jersey rivals.
"I didn't feel super but I managed to hang in there," said Thomas.
"For me it's decent and for Froomey it's even better. At one point we thought about going for the stage but thought 'hold on'. The team is strong and we're communicating really well."
Back to Gap
The peloton returns to Gap on Thursday, the scene of Tuesday's rest day, where Team Sky defended Froome amid questions around the Kenya-born rider's performances.
The team produced data to counter figures from physiologist Pierre Sallet, who had claimed Froome's victory on stage 10 was "abnormal".
The 186.5km stage 18 to Saint-Jean-de-Maurienne includes seven categorised climbs, including the tough 5.1% of Col du Glandon.
"This should be a day for the breakaway to succeed. I don't think a lot will be happening in terms of the yellow jersey because everybody will be keeping an eye on each other before the final two days in the mountains," said Thomas in his stage-by-stage preview.
Stage 17 result
1. Simon Geschke (Germany) Giant 4hrs 12 mins 17secs
2. Andrew Talansky (US) Cannondale +32secs
3. Rigoberto Uran (Colombia) Etixx - Quick-Step +1min 1secs
4. Thibaut Pinot (France) FDJ +1min 36secs
5. Mathias Frank (Switzerland) IAM Cycling +1min 40secs
6. Steven Kruijswijk (Netherlands) LottoNL +2mins 27secs
7. Nicolas Roche (Ireland) Team Sky +3mins 2secs
8. Jonathan Castroviejo (Spain) Movistar +3mins 4secs
9. Serge Pauwels (Belgium) Team MTN +3mins 5secs
10. Adam Yates (GB) Orica +3mins 21secs
General classification after stage 17
1. Chris Froome (GB) Team Sky 69hrs 6mins 49secs
2. Nairo Quintana (Colombia) Movistar +3mins 10secs
3. Alejandro Valverde (Spain) Movistar +4mins 9secs
4. Geraint Thomas (GB) Team Sky +6mins 34secs
5. Alberto Contador (Spain) Tinkoff - Saxo +6mins 40secs
6. Robert Gesink (Netherlands) LottoNL +7mins 39secs
7. Vincenzo Nibali (Italy) Astana +8mins 4secs
8. Mathias Frank (Switzerland) IAM Cycling +8mins 47secs
9. Bauke Mollema (Netherlands) Trek +11mins 47secs
10. Warren Barguil (France) Giant +13mins 8secs