Sant'anna di Vinadio - Vincenzo Nibali all but secured a second Giro d'Italia success with a brave ride to sixth place on Saturday's 20th and penultimate stage.
Starting the day second at 44sec behind leader Esteban Chaves, Italian Nibali put 1min 36sec into the Colombian to snatch the pink jersey.
Sunday's flat, final stage from Cuneo to Torino is little more than a procession.
Two days ago, Nibali was fourth and 4min 43sec off the lead but the 'Shark' went on the attack in the high mountains in what was always likely to provide the most decisive stages of the race.
He won Friday's 19th stage as then-leader Steven Kruijswijk's hopes disintegrated when he crashed on a fast descent, breaking a rib in the process.
It left Chaves in the pink jersey with a 44sec lead to defend but once Niabli went on the attack with 15km left, he couldn't respond.
Even with compatriot Rigoberto Uran helping him despite not riding for the same team, Chaves could not hold onto his lead and finished the day 52sec behind Nibali.
Kruijswijk, who battled on despite his broken rib, struggled up the first category Colle della Lombarda alongside Chaves and lost his place on the podium to Spain's Alejandro Valverde.
The Movistar leader finished just 10-seconds behind Nibali and that was enough to take him above Dutchman Kruijswijk into third at 1min 17sec.
Estonia's Rein Taaramae won the 134km 20th stage from Guillestre to Sant'Anna di Vinadio from Colombia's Darwin Atapuma with American Joe Dombrowski third.Results from Saturday's 134km 20th and penultimate stage of the Giro d'Italia from Guillestre to Sant'Anna di Vinadio:
Rein Taaramae (EST/KAT) 4hr 22min 43sec, 2. Darwin Atapuma (COL/BMC) at
52, 3. Joe Dombrowski (USA/CAN) 1:17, 4. Mikel Nieve (ESP/SKY) 4:12, 5.
Alexander Foliforov (RUS/GAZ) 4:36, 6. Vincenzo Nibali (ITA/AST) 6:44,
7. Alejandro Valverde (ESP/MOV) 6:57, 8. Rigoberto Uran (COL/CAN) same
time, 9. Giovanni Visconti (ITA/MOV) 7:47, 10. Rafal Majka (POL/TIN)
1. Vincenzo Nibali (ITA/AST) 82hr
44min 31sec, 2. Esteban Chaves (COL/ORI) at 52sec, 3. Alejandro Valverde
(ESP/MOV) 1:17, 4. Steven Kruijswijk (NED/LNL) 1:50, 5. Rafal Majka
(POL/TIN) 4:37, 6. Bob Jungels (LUX/ETI) 8:31, 7. Rigoberto Uran
(COL/CAN) 11:47, 8. Andrey Amador (CRC/MOV) 13:21, 9. Darwin Atapuma
(COL/BMC) 14:09, 10. Kanstantsin Siutsou (BLR/DDT) 16:20