Britain's Chris Froome lost the lead of the Criterium du Dauphine as Alberto Contador took the yellow jersey with a bold attack on the penultimate stage.
Team Sky's Froome, the reigning Tour de France champion, crashed on stage six but reached the finish to start stage seven with a 12-second lead.
However, Spain's Contador launched an attack with 2km to go and finished 20 seconds clear of Froome to open up an eight-second lead overall.
Astana's Lieuwe Westra won the stage.
The Dauphine is a warm-up race for the Tour de France, which starts in Yorkshire on 5 July.
Tinkoff-Saxo rider Contador, 31, riding in a group with Froome and Team Sky's Richie Porte, powered ahead on the climb to the finish.
With one kilometre to go, Froome went off alone in a bid to catch the Spaniard, but the 2007 and 2009 Tour de France winner had built enough of a gap to take the lead of the race.
"Obviously I'm disappointed to lose the yellow jersey, but in the same breath, I think we can take a lot away from today - it was such a strong team performance," Froome told the Team Sky website.
"I took a bit of a knock yesterday in the crash and lost a bit of energy because of that. I felt a bit blocked through my thighs, especially where I landed yesterday, but I'm not going to let that get me down.
"I think it's normal that I was a little bit off and Alberto rode a fantastic race, so respect to him."
Contador said: "It's a result that gives me confidence and confirms all the work I've done. I'm on the right track but there are still 20 days until the Tour de France which is the big objective for the season."
Westra, who narrowly missed out on the stage win on Friday, initiated a breakaway with Yury Trofimov and Egor Silin at the 30km mark of the 160km stage and built a lead that reached more than seven minutes.
Trofimov pulled away as they ascended the Col de la Forclaz, with team-mate Silin following suit, but Westra caught both and than overtook them in the final kilometre.
Sunday's eighth and final stage is 131.5km from Megeve to Courchevel and features three category climbs, including another summit finish.
Stage seven result:
1. Lieuwe Westra (Ned/Astana) 4:32:52"
2. Yury Trofimov (Rus/Katusha) +7 secs
3. Egor Silin (Rus/Katusha) +16 secs
4. Alberto Contador (Spa/Tinkoff - Saxo) +1:33 secs
5. Andrew Talansky (US/Garmin) +1:51 secs
6. Ryder Hesjedal (Can/Garmin) +1:53 secs
7. Chris Froome (GB/Team Sky) ST
8. Vincenzo Nibali (Ita/Astana) +2:11 secs
9. Romain Bardet (Fra/AG2R) +2:16 secs
10. Sebastien Reichenbach (Swi/IAM Cycling) +2:19 secs
Overall standings after stage seven of eight:
1. Alberto Contador (Spa/Tinkoff - Saxo) 27:46:51"
2. Chris Froome (GB/Team Sky) +8 secs
3. Andrew Talansky (US/Garmin) +39 secs
4. Wilco Kelderman (Ned/Belkin) +59 secs
5. Jurgen Van den Broeck (Bel/Lotto) +1:14 secs
6. Vincenzo Nibali (Ita/Astana) +1:16 secs
7. Romain Bardet (France/AG2R) +2:11 secs
8. Sebastien Reichenbach (Swi/IAM Cycling) +2:14 secs
9. Leopold Koenig (Cze/NetApp) +3:00 secs
10. Lieuwe Westra (Ned/Astana) +4:04 secs