France's Sandy Casar won the 18th stage of the Tour de France with a brilliant escape in the final three kilometres.
Casar collected his first ever stage win in the Tour
Casar came off his bike early on but recovered to join a breakaway four that also included Michael Boogerd, Laurent Lefevre and Axel Merckx.
But the Francaise Des Jeux rider had the legs to outkick his rivals to take his first ever stage win.
Spain's Alberto Contador retained the yellow jersey but saw Cadel Evans cut his lead by three seconds.
Discovery Channel's Contador has a lead of one minute 50 seconds on Australian Evans and 2:49 on his American team-mate Levi Leipheimer.
"I hope I don't lose because of three seconds," said Contador.
"This yellow jersey is very important. It's important that I have it tonight.
"I'm not a time-trial specialist but I'll do all I can not to lose one minute, 50 seconds."
The trio go into Saturday's penultimate but decisive stage - a relatively flat 55.5km time trial from Cognac to Angouleme, with a chance of winning the Tour.
With that in mind they opted to keep themselves fresh, rather than try and chase down any breakaway in the 211km stage 18 from Cahors to Angouleme.
A four-man group pulled away from the peloton after 16km.
Casar and Frederik Willems saw their early hopes disrupted by a stray dog.
"I did not see it coming," said Casar, who received some medical help during the race as a result of the fall. "I thought my day was over. It hurt everywhere, my back, my shoulders."
Willems failed to recover and dropped back into the peloton but Casar was able to catch Merckx, Boogerd and Lefevre and they gradually extended their lead to over 17 minutes at one stage.
Dutchman Boogerd was at one stage looking at closing in on an overall top six place, although their gap was cut in the closing stages as Euskaltel looked to protect their two riders in the top 10.
The front four came home after over five hours of riding on a hot day - 8:34 ahead of their nearest challengers as Boogerd moved up to 13th place.
But Boogerd along with Lefevre and Axel Merckx had no answer when Casar made his break with less than 3km to go.
The trio had taken turns to try to lose Casar, knowing he possessed the best finish of the quartet, without any success.
And when Casar decided to make his move it seemed to take them by surprise.
Boogerd made a determined attempt to catch Casar in the final 500m but the Frenchman was too strong.
Tom Boonen saw his hold on the green jersey strengthened when he pipped rival Robert Hunter on the line.
The Quick Step rider is 24 points clear of Hunter.
Geraint Thomas was the first British rider across the line, coming home 9'24 behind the leaders for 100th place.
Charles Wegelius (121st) was given the same time as Thomas, while David Millar finished in 139th position with a time of 11'02.
Stage 18 result
1 Sandy Casar (Fra) Francaise des Jeux 5hr 13 min
2 Axel Merckx (Bel) T-Mobile +1 sec
3 Laurent Lefevre (Fra) Bouygues Telecom
4 Michael Boogerd (Neth) Rabobank
5 Tom Boonen (Bel) Quick-Step +8:34
6 Robert Hunter (SA) Barloworld
7 Erik Zabel (Ger) Milram
8 Sebastien Chavanel (Fra) Francaise des Jeux
9 Bernhard Eisel (Aut) T-Mobile
10 Thor Hushovd (Nor) Credit Agricole
100 Geraint Thomas (GB) Barloworld +9:24
121 Charles Wegelius (GB) Liquigas +9:24
139 David Millar (GB) Saunier Duval Prodir +11:02
1 Alberto Contador (Spa) 86 hr 4min 16sec
2 Cadel Evans (Aus) +1:50"
3 Levi Leipheimer (US) +2:49
4 Carlos Sastre (Spa) +6:02
5 Haimar Zubeldia (Spa) +6:29
6 Alejandro Valverde (Spa) +10:18
7 Kim Kirchen (Lux) +11:36
8 Yaroslav Popovych (Ukr) +12:47
9 Mauricio Soler (Col) +13:31
10 Mikel Astarloza (Spa) +13:42
45 Charles Wegelius (GB) Liquigas +1.41:52
70 David Millar (GB) Saunier Duval Prodir +2.26:37
140 Geraint Thomas (GB) Barloworld +3.39:44