Gerdemann went it alone over the last 20km of the stage
German Linus Gerdemann took the yellow jersey of the Tour de France from Fabian Cancellara by winning the first mountain stage of this year's race.
The Tour novice was in a 15-man break for much of the 197.5km stage from Bourg-en-Bresse to Le Grand-Bornand.
But the T-Mobile man went it alone over the Col de la Colombiere, finishing 40 seconds clear of Inigo Landaluze.
Injured race favourites Alexandre Vinokourov and Andreas Kloeden were three minutes and 38 seconds behind.
Fellow big names Cadel Evans, Alejandro Valverde and Levi Leipheimer were in the same group.
Kloeden, sixth in the overall standings , is now the best placed of the top contenders for the overall victory, despite struggling with a hairline fracture to his tailbone.
Vinokourov, who suffered deep cuts to his knees on Thursday, said after the stage: "It was a bit better than yesterday.
"I still suffered a lot. It was important to get past the first pass. It's almost a victory for me.
"I hope it will be better tomorrow. I wanted to stay with the favourites. Then, we'll see."
Swiss Cancellara, who gave a wave to the television camera as he was dropped from the group on the early stages of the final climb, was 148th on the stage, a massive 22'47" behind the winner.
He had signalled his surrender of the yellow jersey earlier in the stage, working alongside his CSC team-mates rather than resting in their slipstream.
Cancellara first dropped behind the pace on the opening climb of the day, over the Cote de Corlier, while a number of riders went off the front, finally forming a 15-man bunch.
Gerdemann, 24, and Kazakhstan's Dmitriy Fofonov moved clear of the breakaway group as the gradient grew.
And, with 20km left, Gerdemann - whose biggest career win before this was a stage of the Tour of Switzerland - went it alone.
Spaniards Landaluze - now second in the general classification at 1'24" - and David de la Fuente gave chase in vain.
Of the five Britons in the race, Charly Wegelius stayed with the leaders for much of the stage, finishing just behind them after the 10km descent from the last col.
David Millar dropped to 53rd overall, more than seven minutes in arrears, describing the stage as "hard and hot".
Sunday's eighth stage ends in a summit finish in Tignes after 165 km and three category-one climbs.
And, after a performance he described as "a dream come true", Gerdemann expects to be back in the ranks for that stage.
"Today was my day, but tomorrow I'll work for my team leader, Michael Rogers," he said.
"I am delighted with my performance and to win the first mountain stage of this year's Tour feels incredible."
Veteran Australian Rogers is currently 4'03" behind his young team-mate in the general classification.
Stage seven result
1. Linus Gerdemann (Ger / TMO) 4 hrs 53 mins 13 secs
2. Inigo Landaluze (Spa / EUS) +40"
3. David De la Fuente (Spa / SDV) +1:39"
4. Mauricio Soler (Col / BAR) +2:14"
5. Laurent Lefevre (Fra / BGT) +2:21"
6. Fabian Wegmann (Ger / GER) +3:32"
7. Juan Manuel Garate (Spa / QSI ) +3:38"
8. Xavier Florencio (Spa / BGT)
9. Christophe Moreau (Fra / AG2R )
10. Alejandro Valverde (Spa / CDE )
Overall standings 1. Linus Gerdemann (Ger / TMO) 34 hrs 43 min 40 sec"
2. Inigo Landaluze (Spa / EUS) +1:24"
3. David De la Fuente (Spa / SDV) +2:45"
4. Laurent Lefevre (Fra / BGT) +2:55"
5. Mauricio Soler (Col / BAR) +3:05"
6. Andreas Kloeden (Ger / AST) +3:39"
7. Vladimir Gusev (Rus / DSC) +3:51"
8. Vladimir Karpets (Rus / CDE) +3:52"
9. Mikel Astarloza (Spa / EUS) +3:55"
10. Thomas Dekker (Ned / RAB) +3:57"
King of the Mountain standings
1. Sylvain Chavanel (Fra / COF ) 42 points
2. Linus Gerdemann (Ger / TMO) 30
3. David De la Fuente (Spa / SDV) 30
4. Laurent Lefevre (Fra / BGT) 27
5. Inigo Landaluze (Spa / EUS) 26