Tadej Pogacar won the 17th stage of the Tour de France but it was Jonas Vingegaard who came a step closer to the title as he finished on the defending champion's wheel to retain the overall leader's yellow jersey.
Pogacar's late acceleration at the top of the final climb, a 8km effort at 7.8 per cent, earned him his third win in this year's Tour and gave him a 10-second time bonus on Wednesday.
Vingegaard, however, picked up six seconds with his second place, meaning he still leads the Slovenian by a comfortable two minutes and 18 seconds going into Thursday's final mountain stage, a gruelling Pyrenean trek to Hautacam.
Geraint Thomas, the 2018 champion, again limited the damage to finish fourth behind Pogacar's UAE Emirates team mate Brandon McNulty and cement his third place in the general classification as the final podium took shape.
Thomas, who crossed the line 2:07 behind Pogacar, lags 4:56 off Vingegaard's pace in the overall standings.
Thursday's stage was yet another opportunity for Pogacar to make the Danish rider crack, but last year's runner-up Vingegaard looked unflappable through the three category-one ascents peppering the second part of the 129.7-km ride from Saint Gaudens.
It was only in the final metres that Pogacar took a slight advantage on a ramp at 13 per cent to take the day's laurels but he now faces a seemingly insurmountable task with only Thursday's stage and Saturday's final time trial to overturn the situation.
"I fought until the finish. Of course I lost four seconds but I'm still happy," said Vingegaard.
"We never know when Tadej will attack, often he attacks when you least expect it. You just need to be vigilant and I was today."
Pogacar, who lost another two team mates after Marc Soler finished outside the time limit on Tuesday and Rafal Majka pulled out injured in the morning, showed he would not go down without a fight.
"I don't think (Vingegaard) is too strong. It was a good day for us. We were strong as a team even if there's just four of us (left in the team). We stay positive and today's victory gives us a lot of motivation for tomorrow," Pogacar said.
"We still have means to fight and we will give everything to get the yellow jersey back."
In the early kilometres, Thibaut Pinot surged ahead, followed by Kazakhstan's Alexei Lutsenko, in the ascent to the Col d'Aspin as the Groupama-FDJ rider hoped to give France their first stage win of this Tour.
They were chased by a dozen riders who were hovering 30 seconds behind and were joined by Romain Bardet after the Frenchman jumped away from the peloton near the top of the climb.
Mikkel Bjerg's acceleration at the front of the main bunch in the Hourquette Ancizan set up a potential attack by Pogacar as riders popped out of the back like corn.
Among the casualties featured Adam Yates while Pinot and Lutsenko's lead was slashed down to 1:20 from two minutes at the top.
The leading duo were caught by the chasing group in the early slopes of the Col de Val Louron-Azet.
McNulty's devilish pace in that penultimate climb was too much to handle for France's David Gaudu, and then Colombian Nairo Quintana before they caught and dropped all the breakaway riders.
Sepp Kuss, the only team mate left with Vingegaard, cracked as Pogacar's lieutenant McNulty continued his demolition work, which ejected Thomas from the back.
Pogacar attacked near the top but Vingegaard covered easily and the duo started the final climb with McNulty 1:20 ahead of Thomas and Bardet.
The Briton dropped Bardet in the final part of the ascent and he now leads fourth-placed Quintana by a massive 2:57 and fifth-placed Gaudu by 3:01.