Defending champion Jonas Vingegaard (26) of Denmark retained the overall leader's yellow jersey after taking third place behind his great rival Tadej Pogacar (24) of Slovenia, extending his lead by a second after bonus seconds are factored in.
Pogacar, who briefly dropped his wiry opponent with a brutal attack in the breathtaking ascent to the Col de Joux Plane (11.6km at 8.5%), almost bumped into a race motorbike as he launched a fierce sprint for bonus seconds at the top before being caught off guard by Vingegaard 300 metres further up.
The Jumbo Visma leader, whose team had set a devilish pace on the Col de la Ramaz (13.9km at 7.1%), took eight bonus seconds and Pogacar five.
The UAE Emirates rider then got a six-second bonus for second place on the stage while Vingegaard took four.
"It's pretty hard to drop him," said Pogacar at the end of the punishing 152-km trek from Annemasse, and although Vingegaard gained time, he might feel his team's investment into the day did not pay off, and almost backfired.
"Jumbo Visma did a super job, I tried but Jonas was strong enough to come back and eventually I could not drop him but when I draw a line, I felt good all day. We can take a lot of confidence into the next days," said Pogacar.
Pogacar looked back repeatedly, hoping to make Vingegaard crack, but each time could see his rival's impassive, linen-white face as both rode at the same pace on gradients nearing 10%.
"I was just doing my own tempo. I didn't want to explode, I did what I was capable of and thankfully I managed to close the gap," said Vingegaard.
The defending champion bridged the gap 1.7km from the summit before Pogacar, a punchier rider than his rival, drew a blank in his sprint attempt, blocked by a photographer's motorbike, which itself was struggling to fend off a sea of screaming, flag- and arm-waving fans. The race jury was meeting over the incident.
"I lost a bullet here," said Pogacar.
The 2020 and 2021 Tour winner put pressure on Vingegaard in the tricky descent into Morzine, but the Danish rider took all the risks to stay in his slipstream as Rodriguez pulled away for his first Tour stage win and to take third place overall, albeit a massive 4:43 off the pace.
Australian Jai Hindley (27), who cracked on the Col de Joux Plane, dropped to fourth, one second behind Ineos-Grenadiers rider Rodriguez.
The stage was stopped for almost half an hour shortly after the start because of a massive pile-up that forced five riders to abandon before another two, including Frenchman and former Tour podium finisher Romain Bardet (32), also crashed out.