Tadej Pogacar is set to win the Tour de France ahead of strong favourite Primoz Roglic in one of the most dramatic turnarounds in the race's history.
Pogacar, 21, will be confirmed as the youngest winner for 111 years at the end of Sunday's largely processional stage to Paris.
The UAE-Team Emirates rider overhauled a 57-second deficit to Roglic, who was thought to be a far stronger rider on stage 20's time trial to La Planche des Belles Filles.
It will be a first Grand Tour victory for Slovenian Pogacar, who took the yellow jersey from compatriot Roglic after he had held it for 13 days.
Pogacar is now 59 seconds ahead of Roglic at the end of a day of drama reminiscent of the 1989 Tour, when Greg LeMond unexpectedly overhauled Laurent Fignon in a final-day time trial to win by eight seconds.
Richie Porte of Trek-Segafredo will be on the podium in Paris for the first time, taking third, three minutes and 30 seconds down.
Pogacar won the stage, one minute 21 seconds ahead of Roglic's Jumbo-Visma team-mate Tom Dumoulin. Porte climbed to third overall after finishing in third place on the stage.
Britain's Adam Yates of Mitchelton-Scott will finish ninth in the general classification, 9mins 25secs behind the winner.
What happened to Roglic?
Roglic has looked imperious throughout the three-week race thanks to support from his powerful team, featuring some of the sport's best riders, including Dumoulin, Wout van Aert and Sepp Kuss.
The 36km stage from Lure to La Planche des Belles Filles was a challenging course that finished, unusually for time trial, with a category 1 climb. Roglic, 30, was considered a far better time triallist than Pogacar, and began the stage strongly.
But Roglic hit trouble at the changeover from super-fast specialist time-trial bikes to a more conventional road machine before the climb, struggling to clip into his pedals, wobbling when being pushed away and never seeming to find his typical rhythm.
Roglic, who claimed his first Grand Tour victory at last year's Vuelta a Espana, looked desperate as he crossed the line, his helmet pushed upwards and slightly lop-sided, knowing already he had lost the race.
Desperation turned to confusion and dejection as he sat on the ground in his full yellow skinsuit, trying to comprehend how he had committed one of modern cycling's biggest chokes.
And as Pogacar sat down for his post-race TV interview, Roglic interrupted it to embrace his countryman.
"I just didn't push enough," said Roglic. "It was like that. I was more and more without the power I needed but I gave it all until the end.
"We'll see what happens next. I can be happy with the racing we showed here so let's take positive things out of it."
From a distant second, Pogacar takes it all
Roglic had been favourite to win the 107th edition of cycling's greatest race, alongside defending champion Egan Bernal of Ineos Grenadiers.
However, Bernal abandoned the race before stage 17 following a disastrous climb up the Grand Colombier on stage 15, where he cracked and lost more than seven minutes to Roglic.
It was one of the biggest downturns in form for a defending champion in recent history, and put an end to Ineos' record of winning every Tour since 2015, four of which were as Team Sky.
Ineos looked set to have something to celebrate as they tried to seal the polka dot King of the Mountains jersey through their second protected rider Richard Carapaz.
But despite 2019 Giro d'Italia winner Carapaz's attempts to deliberately ride a slow first section before blasting up the mountain, Pogacar's epic performance eclipsed him and he took the jersey.
It is the second of three jerseys Pogacar will claim at this year's race - he will also pick up the young riders' white jersey.
In total Pogacar picks up prize money of 500,000 euros (£458,270) for the yellow jersey, 25,000 euros (£22,900) for the King of the Mountains award, and a further 20,000 euros (£18,300) for being the best placed young rider.
"I'm really proud of the team," Pogacar said. "They did such a big effort. We were dreaming of the yellow jersey from the start. Amazing.
"It was not just me today, we needed the whole team for the recon. I knew every corner and knew exactly where to accelerate. Congrats to all my team.
"I didn't hear anything on the radio in the final five kilometres because the fans were too loud so I just went full gas.
"My dream was just to be on the Tour de France and now I've won it. It's unbelievable."
General classification after stage 20
1. Tadej Pogacar (Slo/UAE Team Emirates) 84hrs 26mins 33secs
2. Primoz Roglic (Slo/Jumbo-Visma) +59secs
3. Richie Porte (Aus/Trek-Segafredo) +3mins 30secs
4. Mikel Landa (Spa/Bahrain McLaren) +5mins 58secs
5. Enric Mas (Spa/Movistar) +6mins 07secs
6. Miguel Angel Lopez (Col/Astana) +6mins 47secs
7. Tom Dumoulin (Ned/Jumbo-Visma) +7mins 48secs
8. Rigoberto Uran (Col/EF Pro Cycling) +8mins 02secs
9. Adam Yates (GB/Mitchelton-Scott) +9mins 25secs
10. Damiano Caruso (Ita/Bahrain McLaren) +14mins 03secs
Stage 20 result
1. Tadej Pogacar (Slo/UAE Team Emirates) 55mins 55secs
2. Tom Dumoulin (Ned/Jumbo-Visma) +1min 21secs
3. Richie Porte (Aus/Trek-Segafredo) Same time
4. Wout van Aert (Bel/Jumbo Visma) +1min 31secs
5. Primoz Roglic (Slo/Jumbo-Visma) +1min 56secs
6. Remi Cavagna (Fra/Deceuninck-Quick-Step) +1min 59secs
7. Damiano Caruso (Ita/Bahrain McLaren) +2mins 29secs
8. David de la Cruz (Spa/UAE Team Emirates) +2mins 40secs
9. Enric Mas (Spa/Movistar) +2mins 45secs
10. Rigoberto Uran (Col/EF Pro Cycling) +2mins 54secs