MERIBEL, France -- Colombian rider Miguel Angel Lopez won the toughest mountain stage of the Tour de France, while race leader Primoz Roglic added a few crucial seconds to his advantage over rival Tadej Pogacar on Wednesday.
Roglic finished 15 seconds behind Lopez in second place, while Pogacar trudged over the line 30 seconds behind Lopez in third.
The 170-kilometer (105.4-mile) trek's final ascent to the Méribel ski station was the high point of this year's race at 2,304 meters, winding up a Loze pass never before ridden and with tortuous gradients of 24%.
Lopez timed his attack perfectly with just under 3 kilometers to go while Roglic accelerated away from Pogacar, who clawed some of the gap back but may have bid farewell to his chances of winning the Tour.
Roglic is 57 seconds ahead of Pogacar with four stages remaining. Lopez overtook Rigoberto Urán to move up to third overall and is 1 minute, 26 seconds behind Roglic heading into another testing mountain stage on Thursday. Urán dropped to sixth.
As riders tackled the steepest section of the Loze, where tarmac was laid last year on a mountain path which is only open to bikes, Pogacar increased the pace with about 4 kilometers left while Roglič tucked behind him and Uran was dropped.
Lopez then attacked and went after Richard Carapaz, one of five riders who had formed an early breakaway group and the last to be caught with 3 kilometers remaining.
With Lopez surging ahead, Roglič attacked his Slovenian countryman Pogacar, who responded well near the end to limit the damage.
French President Emmanuel Macron was on hand to applaud Lopez when he crossed the finish line after 4 hours, 49 minutes and 8 seconds of a grueling trek which featured two of the hardest climbs known as Hors Categorie, or beyond category.
Earlier, Macron had been a keen spectator in race director Christian Prudhomme's red car, and as the camera pointed at them they were seen applying hand sanitizer. Prudhomme recently returned to the race following a period in isolation after testing positive for the coronavirus.
The others in the early breakaway group were Julian Alaphilippe, Dan Martin, Gorka Izagirre and Lennard Kämna, the winner of Tuesday's stage with a solo effort.
They upped the tempo as they passed the stunning Château de Miolans, a fortress perched on a hilltop which the Counts of Savoy turned into a prison that French nobleman the Marquis de Sade escaped from in the late 18th century.
By the time they reached the foot of the Madeleine pass -- the first of the day's two HC climbs -- they were about six minutes up on the yellow jersey group. The Madeleine is one of the most famed on the Tour and the second-highest summit on this year's race at 2,000 meters.
When they reached the top after an ascent of 17.1 kilometers (10.6 miles) their lead over the yellow jersey group had been whittled down to 1:15.
Sam Bennett kept the green jersey for best sprinter but Benoit Cosnefroy faded early in the final ascent and lost his best climber's polka-dot jersey to Pogacar.
Defending champion Egan Bernal pulled out before Wednesday's stage. The Colombian had been struggling since Friday's stage in the Jura mountains, where he dropped more than seven minutes on the main contenders.
Stage 18 from Méribel is 175 kilometers (108.5 miles) long and another demanding one with an early Category 1 climb, followed by another one up the Aravis pass and the Hors Categorie Plateau des Glières before an undulating descent to La Roche-sur-Foron.