Rafal Majka of the Tinkoff-Saxo team clinched his second stage win of this year's Tour de France on a demanding stage 17 featuring four major climbs.
Giovanni Visconti made the initial break up the final ascent but settled for second after being caught by Polish polka dot jersey holder Majka.
Yellow jersey holder Vincenzo Nibali took third after an impressive final climb to extend his overall lead.
The Italian now leads Alejandro Valverde by five minutes, 26 seconds.
The Spaniard was dropped by the general classification group with 5.5km remaining, while Frenchman Thibaut Pinot is now 34 seconds further back at six minutes behind Nibali.
The 124.5km route from Saint-Gaudens to Saint-Lary Pla d'Adet, the shortest of the this year's Tour, was decided on the finishing ascent when 24-year-old Majka made his move.
|Magnus Backstedt - Former Tour de France stage winner|
|"The Tinkoff-Saxo team is filled with confidence now after Michael Rogers' win on Tuesday and they are getting the confidence and form. Without Alberto Contador this is the next best result they could have hoped for and once they got the first win under their belt the floodgates appear to be opening for more stage wins."|
Majka won Saturday's 14th stage to Risoul and recorded Tinkoff-Saxo's second successive Pyrenean stage win after Michael Rogers' success on Tuesday as the team's strong performance since losing leader Alberto Contador to injury continued.
Contador began the race as one of the overall favourites, but challengers to Astana rider Nibali have faded away and his grip on this year's title was strengthened further in the penultimate mountain stage.
His closest rival Valverde struggled on the final climb, while Nibali showed his strength by swiftly making ground on the remnants of the day's breakaway.
Valverde managed to overtake Thibaut Pinot, with the battle for the podium set to continue in Thursday's 145.5km stage from Pau to Hautacam.
|What to expect on stage 18|
|"The final battle in the mountains takes in the iconic Col du Tourmalet before the final showdown on Hautacam. Expect Vincenzo Nibali to be all guns blazing."|
|Read Geraint Thomas's stage-by-stage guide|
Frenchman Pinot, along with compatriots Jean-Christophe Peraud and Romain Bardet, are in contention to overhaul Valverde, but Nibali's place at the top appears out of reach.
"The four climbs in a row really hurt," said Nibali, who is looking to become the sixth man to win all three Grand Tours following victory in the 2010 Vuelta a Espana and last year's Giro d'Italia.
"The team did an amazing job. I'm a bit relieved. I feared this stage a little bit. With such an intense stage, you never know what can happen.
"It can explode in the first climb and then, what do you do? The plan, anyway, was to stay calm and stay altogether."
Majka, who gave Tinkoff-Saxo their third stage win of the tour, added: "I'm just so happy about this result and these results that we have accomplished in the last couple of days.
"My team-mates really worked hard for me and especially Nico (Roche) was digging hard to set me up on the final climb.
"I wasn't so sure about managing the stage at first but (team general manager) Bjarne (Riis) told me to go for the stage and if we take the stage, we will have the (polka dot) jersey and here we are."
Stage 17 result
1. Rafal Majka (Pol/Tinkoff-Saxo) 3hrs 35mins 23secs
2. Giovanni Visconti (Ita/Movistar) +29 secs
3. Vincenzo Nibali (Ita/Astana) +46
4. Jean-Christophe Peraud (Fra/AG2R) same time
5. Alessandro De Marchi (Ita/Cannondale) +49
General classification after stage 17
1. Vincenzo Nibali (Ita/Astana) 76hrs 41mins 28secs
2. Alejandro Valverde (Spa/Movistar) +5:26
3. Thibaut Pinot (Fra/FDJ.fr) +6:00
4. Jean-Christophe Peraud (Fra/AG2R) +6:08
5. Romain Bardet (Fra/AG2R) +7:34