Romain Bardet delivered a second home win in this year's Tour de France as leader Chris Froome remained unscathed by a second day of climbs in the Alps.
AG2R rider Bardet, 24, beat a breakaway group to the top of the 1,924m Col du Glandon and, with 34km remaining of stage 18, eked out a decisive lead.
Pierre Rolland finished 33 seconds behind to complete a French one-two.
Britain's Froome stays three minutes 10 seconds ahead of Colombia's Nairo Quintana with three stages remaining.
As happened during stage 17, 30-year-old Froome and Team Sky withstood several attacks on the 186.5km route from Gap to Saint-Jean-de-Maurienne.
But there was little panic among Froome's disciplined team, and the Team Sky leader looks confident of repeating his triumph of 2013.
Alejandro Valverde remains third with Team Sky's Geraint Thomas, 29, fourth.
Thomas the tank
It was Welshman Thomas who was once again the driving force behind Team Sky's defensive manoeuvres, and was on hand to help out Froome on a couple of occasions, with the Briton looking susceptible for the first time this year, if only for a few fleeting seconds.
Vincenzo Nibali and Alberto Contador made moves away from the yellow jersey group on the 21.7km grind up Col du Glandon, but were both reigned in.
It was on the winding, hairpin riddled ascent of Montvernier that Nibali had Froome grasping for a food sachet in his back pocket.
Thomas was able to keep the Italian in contact and even though Froome had drifted to the back of the group, he soon rekindled his familiar form and was able to sprint to the line with his general classification contenders.
|Analysis: BBC Radio 5 live's Rob Hayles|
|"Geraint Thomas was so strong and it was a great ride. It's kind of a role reversal for Chris Froome in the way he helped Bradley Wiggins win that first British yellow jersey.|
|"Geraint actually looked in better shape than Froome there - Froome looked on the edge at times, although admittedly it wasn't a problem."|
|Download the latest BeSpoke podcast from the Tour de France|
"It was a perfect stage, ideal really," Thomas told ITV4 afterwards. "Again the team was really strong. We had good numbers and didn't panic when guys were attacking. Contador is six minutes down, so he has more to worry about than us.
"The last climb was tough with all the hairpins but we only have two more days to go [in the Alps]."
There is an expectation in France that Bardet will go on to become a future Tour winner, and he signalled his potential with a break from the leading group on the Col du Glandon.
The Auvergne-born rider finished sixth overall last year, and was greeted at Saint-Jean-de-Maurienne by a euphoric French crowd, with the home support having witnessed only one French winner so far in this Tour.
"What a crazy stage," he said. "I knew with my descending talents I could get the gap. I can't believe it. It's so hard to win a stage."
Polka dot prize
While the race for yellow remains somewhat sedate, the battle for the king of the mountains jersey is heating up.
Joaquim Rodriguez won the first five climbs of the day to surpass Froome at the top of the leaderboard, but Bardet's victories on the final two ascents means the pair are locked on 68 points in the competition for the polka dots.
Froome and Bardet's bikes were two of six tested for the presence of a motor in the frame after the stage.
Cycling's governing body the UCI carries out checks as a matter of practice.
Froome has had to defend himself this week after the legitimacy of his performances had been questioned, and he welcomed the tests.
"I'm happy that they're doing the checks. It's probably needed given all the rumours out there," he said.
With two more stages to come in the Alps, before Sunday's procession into Paris, anyone hoping for a closer affair between Quintana and Froome will draw on the Colombian's proven strength in the mountains.
Stage 19 on Friday travels 138km from Saint-Jean-de-Maurienne to La Toussuire where, three years ago, Froome left Bradley Wiggins on the climb before being ordered to wait for his team-mate.
"There are two more stages left of real racing," said Froome.
"This time two years ago, I was just sort of hanging on. It's the last challenge. We can really expect it to be a big finale."
However Briton Mark Cavendish's hopes of winning the sprint finish to Sunday's final stage has suffered a set-back with the withdrawal from the race of team-mate and key lead-out man, Mark Renshaw.
Cavendish has won the final sprint on four occasions.
Now listen to the latest BeSpoke Tour de France podcast with Simon Brotherton, Rob Hayles and Matt Slater.
Stage 18 result
1. Romain Bardet (France) AG2R 5hrs 3mins 40secs
2. Pierre Rolland (France) Europcar +33secs
3. Winner Anacona (Colombia) Movistar +59secs
4. Bob Jungels (Luxembourg) Trek same time
5. Jakob Fuglsang (Denmark) Astana same time
6. Serge Pauwels (Belgium) Team MTN +1min 1secs
7. Cyril Gautier (France) Europcar +1min 50secs
8. Damiano Caruso (Italy) BMC Racing same time
9. Andrew Talansky (US) Cannondale +1min 55secs
10. Warren Barguil (France) Giant +3mins 2secs
11. Robert Gesink (Netherlands) LottoNL
12. Chris Froome (GB) Team Sky same time
General classification after stage 18
1. Chris Froome (GB) Team Sky 74hrs 13mins 31secs
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 +12mins 6secs
10. Romain Bardet (France) AG2R +12mins 52secs