Vincenzo Nibali is set to win the Giro d'Italia after a sensational ride on Saturday's final mountain stage, which was won by Estonia's Rein Taaramae.
The Italian started the day 44 seconds behind race leader Esteban Chaves but attacked and erased that deficit on the penultimate ascent of the 20th stage.
Nibali, 31, went further clear on the climb to the summit finish, and is now 52 seconds clear of Colombian Chaves.
Sunday's final stage is a largely processional race finishing in Turin.
It is expected to end with a sprint finish so Nibali has only to cross the line with the peloton to be confirmed as champion of his home race for a second time.
The 134km stage was largely uneventful, with Nibali and Chaves watching each other's every move until the Astana rider attacked with 15km remaining.
Orica GreenEdge rider Chaves initially followed but could not keep pace with Nibali for more than a couple of hundred metres.
Rigoberto Uran caught Chaves and, despite riding for a different team, tried to pace his fellow Colombian to the top of the mountain.
However, Nibali received pace-setting help from Astana team-mate Tanel Kangert, who had been in the break, to within a couple of kilometres of the summit.
Chaves finally cracked near the top of that climb and laboured up the final ascent to finish 96 seconds behind Nibali on the stage.
"It was a crazy Giro, a difficult, exhausting one," said Nibali who will win the race for a second time.
"I started as the favourite and felt all the pressure but I've put on this great show."
Orica GreenEdge's sporting director Matt White told Eurosport that the team were "still proud of Esteban".
He added: "We're second at the Giro behind one of the best Grand Tour riders of recent years. There's no disgrace in that.''
Spain's Alejandro Valverde finished just 13 seconds adrift of Nibali to move up to third overall, one minute and 17 seconds back.
He moved ahead of Steven Kruijswijk, who led the race by more than three minutes until a nasty fall on Friday's 19th stage saw him break a rib and effectively end his challenge, although he is completing the race.
Katusha rider Taaramae had been part of a breakaway group and he won the race from Guillestre to Sant'Anna di Vinadio by 52 seconds from BMC Racing's Colombian Darwin Atapuma.
Stage 20 result:
1. Rein Taaramae (Est/Katusha) 4hrs 22mins 43secs
2. Darwin Atapuma (Col/BMC Racing) +52secs
3. Joe Dombrowski (US/Cannondale) +1min 17secs
4. Mikel Nieve (Spa/Team Sky) +4mins 12secs
5. Alexander Foliforov (Russia / Gazprom) +4mins 36secs
6. Vincenzo Nibali (Ita/Astana) +6mins 44secs
7. Alejandro Valverde (Spa/Movistar) +6mins 57secs
13. Steven Kruijswijk (Ned/LottoNL) +8mins 13secs
14. Esteban Chaves (Col/Orica) +8mins 20secs
General classification after stage 20:
1. Vincenzo Nibali (Ita/Astana) 82hrs 44mins 31secs
2. Esteban Chaves (Col/Orica) +52secs
3. Alejandro Valverde (Spa/Movistar) +1min 17secs
4. Steven Kruijswijk (Ned/LottoNL) +1min 50secs
5. Rafal Majka (Pol/Tinkoff) +4mins 37secs