France's Blel Kadri produced a terrific solo ride to win stage eight's first mountainous race of the Tour de France.
Kadri rode clear of four other escapees in the last 25km, including Britain's Simon Yates, to be first to the summit finish at Gerardmer La Mauselaine.
Alberto Contador finished second to claw three seconds back on leader Vincenzo Nibali, his main rival for the overall victory, who finished third.
"Today was my day, and I'm really happy," said Kadri.
|Rob Hayles - BBC Sport commentator|
|"What a day for the French. The poor crowd have had to stand on the hill in the rain all day but they haven't been disappointed with a superb win by Blel Kadri. It was also a good ride by Team Sky's Richie Porte. Team Sky can fly under the radar a bit now because they don't have a Chris Froome or Bradley Wiggins. They can sit back and let the other teams do the work."|
|Listen to the 5 live podcast|
Team Sky's Richie Porte finished fourth on the stage, to move up to third overall, one minute 58 seconds behind Astana's Nibali.
In another enthralling finish, Italian Nibali, who began the day with an advantage of two minutes, 37 seconds over Tinkoff - Saxo's Contador, tracked the Spaniard up the final 1.8km-long ascent and believed he could have kept closer but for a technical mistake.
"On the final climb Alberto kept attacking but I managed to follow him quite comfortably," said 2013 Giro d'Italia winner Nibali of the stage's final climb.
"I got the wrong gear and he accelerated straight afterwards.
"The important thing was that I was there. He took three seconds in the last 100 metres. I don't know how significant that can be."
But it is Kadri who deserves the plaudits for a sensational ride that began early in the stage when he, Yates and Adrien Petit (Cofidis) set off in pursuit of Niki Terpstra and Sylvain Chavanel to form a five-man breakaway.
The quintet opened a lead of 11 minutes on the relatively flat opening three-quarters of the 161km race from Tomblaine.
However, with tired legs in their group and 12km of climbing spread across three hills in the final 30km, the peloton began to reduce their deficit.
|What to expect on stage nine|
|"Sunday is a nailed-on breakaway day, especially with the stage starting on a climb. There will be a number of breakaway specialists who have been taking it easy, looking at this stage. The teams that don't have a General Classification contender will be trying to get a rider in the break."|
|Read Geraint Thomas's stage-by-stage guide|
Chavanel and Kadri, sensing they would be caught, broke clear again with 25km to go, the latter pushing on alone to be first to reach the summit of the first and longest of the three climbs, a 7.2km ride up Col de la Croix des Moinats.
AG2R rider Kadri stayed clear on the descent, building up a lead of more than two minutes over fellow Frenchman Chavanel, while Yates, who rode clear of Petit and Terpstra (Omega Pharma - Quick-Step), was between Chavanel (IAM Cycling) and the peloton.
Yates, who rides for Orica GreenEdge, was caught by the chasing peloton a few hundred metres from the finish and eventually finished 43rd, almost six minutes behind the stage winner.
Kadri also toiled up the final climb, which featured gradients of 16% but he had built up enough of an advantage to clinch a comfortable victory.
Riding solo over the stage's three climbs also ensured that Kadri took ownership of the polka-dot King of the Mountains jersey from countryman Cyril Lemoine.
Stage eight result:
1. Blel Kadri (Fra/AG2R) 3hrs 49mins 28secs
2. Alberto Contador (Spa/Tinkoff - Saxo) +2mins 17secs
3. Vincenzo Nibali (Ita/Astana) +2mins 20secs
4. Richie Porte (Aus/Team Sky) +2mins 24secs
5. Thibaut Pinot (Fra/FDJ.fr) +2mins 28secs
6. Jean-Christophe Peraud (Fra/AG2R) Same time
7. Alejandro Valverde (Spa/Movistar) +2mins 36sesc
8. Tejay van Garderen (US/BMC Racing) +2mins 40secs
9. Romain Bardet (Fra/AG2R) +2mins 48secs
10. Sylvain Chavanel (Fra/IAM Cycling) +2mins 54secs
General classification after stage eight:
1. Vincenzo Nibali (Ita/Astana) 33hrs 48mins 52 secs.
2. Jakob Fuglsang (Den/Astana) +1min 44secs
3. Richie Porte (Aus/Team Sky) +1min 58secs
4. Michal Kwiatkowski (Pol/Omega Pharma - Quick-Step) +2mins 26secs
5. Alejandro Valverde (Spa/Movistar) +2mins 27secs
6. Alberto Contador (Spa/Tinkoff-Saxo) +2mins 34secs
7. Romain Bardet, (Fra/AG2R) +2mins 39secs
8. Rui Costa (Por/Lampre-Merida) +2mins 52secs
9. Bauke Mollema (Ned/Belkin), +3mins 02 secs
10. Jurgen Van den Broeck (Bel/Lotto-Belisol) Same time
13. Tejay van Garderen (US/BMC Racing) + 3mins 34secs
15. Geraint Thomas (GB/Team Sky) +3mins 54secs