The Netherlands' Steven Kruijswijk took the overall lead of the Giro d’Italia as both Vincenzo Nibali and Alejandro Valverde cracked and lost time on a thrilling 14th stage won by Esteban Chaves.
All of the race favourites were together at the foot of the last of the 210km day's six categorised climbs, but an attack from Nibali (Astana) dropped Valverde (Movistar) and the Spaniard ended up losing three minutes.
But then Nibali also fell away when a clearly on-form Kruijswijk (LottoNL-Jumbo) attacked 3km later and only Chaves (Orica-GreenEdge) could follow.
The duo subsequently joined up with the last two surviving members of the original breakaway and Chaves sprinted to victory in Corvara in the Dolomites ahead of Kruijswijk in second, Georg Preidler (Giant-Alpecin) in third and Darwin Atapuma (BMC Racing) in fourth.
Nibali followed 37 seconds later in fifth after a dogged battle to limit the damage and keep his hopes of victory alive.
With previous leader Andrey Amador (Movistar) having also been dropped, Kruijswijk climbed from fifth to the top of the general classification and opened up a 41-second lead over second-placed Nibali, while Chaves rose from eighth to third and is now 1min 32sec back.
Valverde remains fourth overall, but his catastrophic day saw him plummet from 43 seconds off the pink jersey to an almost certainly unassailable 3min 6sec.
Kruijswijk told Eurosport: "I came here with big ambitions and go good in the GC [general classification], but to have the pink jersey is something else. I cannot believe I have the pink jersey now. I'm really happy.
"This morning we made a plan and I said I would try to follow Nibali and Valverde. I knew Nibali was going to attack and I was really good behind him, so I thought, 'OK, maybe I can do something on my own today'.
"I tried in the final and I think it was the right timing. Luckily Esteban came with me and we could work together a little bit."
Chaves said: "After 5,000m of climbing, I'm tired but I'm really really happy. Winning the queen stage at the Giro d'Italia is really special.
"Everyone was riding at their limits. Kruijswijk started his attack then I tried to follow. Then we saw Nibali was dropped, so we started to work together. There is a lot of this race left and this is great, but we will see what happens tomorrow."
The Giro continues on Sunday with a 10.8km uphill time trial from Castelrotto to Alpe di Siusi. Find out more about stage 15 in our race guide.
Stage 14 result
1 Esteban Chaves (Col) Orica-GreenEdge, 6:06:16
2 Steven Kruijswijk (Ned) LottoNL-Jumbo, same time
3 Georg Preidler (Aut) Giant-Alpecin, st
4 Darwin Atapuma (Col) BMC Racing, +6sec
5 Vincenzo Nibali (Ita) Astana, +37
6 Kanstantsin Siutsou (Blr) Dimension Data, st
7 Ilnur Zakarin (Rus) Katusha, +2:29
8 Rafal Majka (Pol) Tinkoff, st
9 Rigoberto Uran (Col) Etixx - Quick-Step, +2:50
10 Domenico Pozzovivo (Ita) Ag2r-La Mondiale, +3:00
General classification
1 Steven Kruijswijk (Ned) LottoNL-Jumbo, 60:12:43
2 Vincenzo Nibali (Ita) Astana, +41
3 Esteban Chaves (Col) Orica-GreenEdge, +1:32
4 Alejandro Valverde (Esp) Movistar, +3:06
5 Andrey Amador (Cos) Movistar, +3:15
6 Rafal Majka (Pol) Tinkoff, +3:29
7 Ilnur Zakarin (Rus) Katusha, +3:53
8 Rigoberto Uran (Col) Etixx - Quick-Step, +5:01
9 Kanstantsin Siutsou (Blr) Dimension Data, +5:38
10 Jakob Fuglsang (Den) Astana, same time