Italy's Vincenzo Nibali is on the verge of celebrating his second Giro d'Italia triumph.
The 31-year-old, from Sicily, had hauled himself right back into general classification contention after winning stage 19 - his first stage win since he won the race in 2013.
He began the penultimate stage - won by Estonian Rein Taaramae (Katusha) - 44 seconds behind Esteban Chaves (Orica-GreenEdge) in the pink jersey but finished in sixth place after mounting an attack on the final big climb of the day.
Chaves was back in 14th, meaning Nibali (Astana) now holds a 52-second lead over the Colombian, with Spain's Alejandro Valverde (Movistar) in third place, 1:17 off the pace.
The final stage is a ceremonial ride into Turin with Nibali only needing to cross the line with the peloton to claim the title.
Nibali said: "It's been a fantastic day. I especially have to thank my team because they were extraordinary, especially Michele Scarponi and Tanel Kangert toward the finish, and Jakob Fuglsang was a great help to me.
"At high altitude I was confident I could breathe and ride better than anyone. I was not afraid of losing and I was not afraid of winning."
Chaves was in diplomatic mood and said: "I'm tired but this is the life, it is only a bike race. I tried and did the best I could.
"The team did the best they could. I'm here. I'm happy. I did my best. I tried and this is just the beginning for me.
"I'm OK [health-wise]. I don't have excuses. I didn't have the legs and that is normal. You need strength to do this. It was one race of 80 hours and 3,000km, and there are no excuses."