Olympic champion Richard Carapaz of EF Education-EasyPost climbed solo to victory on stage 17 of the Tour de France, a 178km ride from Saint-Paul-Trois-chateaux to SuperDevoluy.
Carapaz, who has also won stages on the Giro d'Italia and Vuelta a Espana, finished 37 seconds ahead of Jayco Alula's Simon Yates to claim his first win on the Tour de France, with Movistar Enric Mas third, nearly a minute behind.
The 31-year-old Carapaz also became the first Ecuadorian to win a stage at the Tour.
His attack in the mountains, about 13km from the finish, helped the Tokyo 2020 gold medallist breeze to victory but there was a battle in the general classification behind him as Slovenia's Tadej Pogacar retained his yellow jersey.
Pogacar attacked towards the end of the stage, forcing rivals Jonas Vingegaard and Remco Evenepoel to respond.
Evenepoel, who is third in the overall standings, attacked on the climb to pull ahead of Pogacar and second-placed Jonas Vingegaard to cross the line first among the contenders.
Pogacar, meanwhile, waited for the right opportunity and attacked later on to extend his lead by two more seconds while Evenepoel closed in on Vingegaard in the general classification.
Earlier, Biniam Girmay came fifth in the intermediate sprint but held on to the green jersey when he beat Belgian Jasper Philipsen to the line, narrowly extending his lead in the standings to 33 points.
Girmay crashed less than 2km to the finish in Tuesday's stage 16 which allowed Philipsen to comfortably sprint to victory but the Eritrean will now keep the green jersey a little longer.
Ben Healy, team-mate of winner Carapaz, was 64th in the stage, finishing over 17 minutes behind the stage winner, dropping to 17th place overall.
Sam Bennett has withdrawn from the race ahead of the final four stages, including Sunday's time-trial finish in Nice, which replaces the traditional sprint finish on the Champs-Élysées due to the upcoming Olympic Games in Paris.
"Sam Bennett retires from the race," confirmed his team Decathlon AG2R La Mondiale on social media. "Our sprinter, 4th yesterday in Nîmes, leaves the Tour de France on stage 17."