Chris Froome is set to win his fourth Tour de France title after increasing his lead in Saturday's penultimate time trial in Marseille.
Froome finished third on the stage, won by Poland's Maciej Bodnar, with Froome's Team Sky team-mate Michal Kwiatkowski second.
With Sunday's stage into Paris traditionally a procession, Froome will be able to celebrate on the roads into the capital as he lead grew to 54 seconds over former team-mate Rigoberto Uran.
Frenchman Romain Bardet began the stage second, 23 seconds down, but faded badly and only retained a podium spot by one second ahead of Team Sky's Mikel Landa.
Bodnar, who was cruelly denied victory out of a breakaway on stage 11, completed the 22.5 kilometre course in a time of 28 minutes 15 seconds to win by just one second from his compatriot Kwiatkowski, with Froome a further five seconds back.
Froome's third place on the day means he is only the seventh man in history to win the Tour without picking up a stage victory on the way.
But he was able to enjoy the final metres all the same as he could be seen chasing down the struggling Bardet on the last straight towards the Stade Velodrome.
The 32-year-old would have known at that point his fourth Tour, and third in a row, was in the bag as Colombian Uran had, moments before, run wide on one of the final corners, touching the barriers and losing all momentum.
The Cannondale-Drapac rider recovered to take eighth place on the day, which sees him move up to second overall - matching his previous best in a grand tour as he was second in the Giro d'Italia in both 2013 and 2014.
Irishman Dan Martin finished in 40th place, enough to keep the Quick-Step Floors rider in sixth place in the general classification - his best ever finish in the Tour de France.
Bury's Simon Yates hung on to seventh place overall, securing the young riders' white jersey which was won by his twin brother and Orica-Scott team-mate Adam 12 months ago.
Froome's margin of victory will be the closest of his four to date, tighter than the 72 seconds by which he won from Nairo Quintana in 2015, having fallen ill late in the Tour and seen his lead whittled down in the Alps.
Last year Froome won by four minutes and five seconds from Bardet.
But the margin is immaterial as Froome heads towards four Tour titles, just one behind the all-time record jointly held by Eddy Merckx, Jacques Anquetil, Bernard Hinault and Miguel Indurain.
Bora-Hansgrohe's Bodnar set the benchmark early, having been 52nd of the ramp with 167 riders left in the Tour.
World time trial champion Tony Martin was the first to go close, but the German rider was 14 seconds adrift.
When Kwiatkowski went within a second, Froome was watching on from the Sky team car to gauge the best way to attack the course, largely flat except for the short, steep climb up to Notre-Dame de la Garde.
Bodnar was able to celebrate after the disappointment of stage 11 to Pau, when he was part of the breakaway for 200 kilometres, only to be caught by the pack just 200 metres from the line.