Team Sky's Geraint Thomas extended his lead in the Tour de France as Chris Froome slipped out of second place on 17th stage won by Nairo Quintana.
Ireland's Dan Martin finished second, coming home 28 seconds behind Quintana.
Froome, meanwhile, slipped back off the main group of contenders late on the climb to the summit finish on the Col du Portet before Thomas jumped clear of rivals Tom Dumoulin and Primoz Roglic, who started the day third and fourth in the general classification.
Thomas took third place on the stage behind Martin, picking up a handful of bonus seconds to go with the time gained on the road.
That means Thomas now leads the Tour by one minute 59 seconds from Team Sunweb's Dumoulin, with Froome two minutes and 31 seconds back.
Froome began to struggle around two kilometres from the top of this imposing climb, losing the wheels as Roglic and Dumoulin drove on the front to try to distance the four-time Tour winner.
Thomas stuck with them, and then burst clear in the final few hundred metres, picking up four seconds on the road to go with four bonus seconds.
Froome drifted back badly despite getting help from team-mate Egan Bernal, finishing 48 seconds behind team-mate Thomas, who now looks in a commanding position with one more mountain test to come before Saturday's time trial.
PA