French cyclist Sandy Casar has won the 18th stage of the Tour de France while Spaniard Alberto Contador retained the overall leader's yellow jersey.

Casar captured his first Tour stage win in a sprint finish among four cyclists who broke away from the main pack in the 211-kilometer ride. His time of five hours, 13 minutes, 31 seconds was the same as Axel Merckx of Belgium, Laurent LeFevre of France and Michael Boogerd of the Netherlands.

Tom Boonen of Belgium finished fifth, eight minutes, 34 seconds off the lead. Contador finished eight minutes, 37 seconds behind Casar, but retained the overall lead.

The Spaniard is one minute, 50 seconds ahead of Cadel Evans of Australia and two minutes 49 seconds ahead of American Levi Leipheimer.

Saturday's penultimate stage is a 55.5 kilometer individual time trial between Cognac and Angoulême. The Tour ends in Paris on Sunday.