Czech rider Jan Hirt claimed a first Grand Tour win with victory over a gruelling mountain stage as Richard Carapaz saw his overall lead of the Giro d'Italia cut down to just three seconds.
Stage 16 was through 202 kilometres from Sala to Aprica with three category one climbs and was viewed as one of the most testing of this year's event.
Hirt (Intermarche-Wanty-Gobert Materiaux) had been part of the main breakaway group, before attacking on the final ride up the Valico di Santa Cristina, eventually finishing seven seconds clear of Thymen Arensman (Team DSM).
"I've had a few problems during the stage. My chain dropped, I cramped, but I never gave up," Hirt said following his victory.
"I'm glad I managed to go solo. I always said that my biggest achievement would be to win a stage at the Giro d'Italia and I could stop after that, but I won't stop now."
Australian Jai Hindley - who had come into the stage seven seconds behind in the overall standings - brought the rest of the chasing group home, with Ineos Grenadiers rider Carapaz among them.
Hindely's third place saw the Bora-Hansgrohe rider pick up crucial bonus seconds which moved him closer behind Carapaz in the battle for the maglia rosa leaders' jersey.
However, Joao Almeida (UAE Team Emirates) now sits 44 seconds behind having been unable to respond on the final climb, which saw him lose time to his general classification rivals.
Carapaz said: "It's been a hard stage and at the end I'm happy.
"I thought I was going to win the sprint for third place. I eventually didn't, but it's still a good day for me.
"I've lost a few seconds on Hindley, but I gained more on Almeida so the balance is positive."
Stage 17 runs over another 168km of mountain terrain from Ponte di Legno to Lavarone.