Italian cyclist Matteo Tosatto has won the 18th stage of the Tour de France, but Spanish rider Oscar Pereiro retained the overall lead headed into the race's penultimate stage.

Tosatto won the stage in a sprint finish with a total time of four hours, 16 minutes, 15 seconds, just ahead of compatriot Cristian Moreni. German rider Ronny Scholz was third, two seconds behind the winner.

Pereiro finished with the main pack of riders eight minutes off the lead. American Floyd Landis was part of the same group, meaning that the overall standings did not change. Pereiro leads compatriot Carlos Sastre by 12 seconds with Landis 30 seconds behind the leader.

Saturday's penultimate stage is a 57-kilometer individual time trial. The Tour ends in Paris on Sunday.