Germany's Andre Greipel timed his final burst to perfection when he won a mass sprint to take the sixth stage of the Tour de France.

Greipel, of the Lotto team, beat Slovakian Peter Sagan and fellow German Marcel Kittel at the end of a 176.5-ride from Aix-en-Provence. Mark Cavendish, winner of the fifth stage, came home fourth after a crash with some 30 kilometres left.

South African Daryl Impey took the overall lead, becoming the first African to wear the yellow jersey.

Ireland's Nicolas Roche finished in 32rd place, 5 seconds off the leaders and remains in ninth place in the overall standings. His compatriot Dan Martin finished in the same time and is 16th overall.

Pre-race favourites Chris Froome of Britain, seventh overall eight seconds off the pace, and Alberto Contador, 11th six seconds further back, finished safely in the bunch.

"I told the guys to wait as long as possible and everybody to stay together," said Greipel. "We hit the front with two kilometres to go and I think people can see we have some horsepower. I'm really proud of this team."

Greipel's effort was even more impressive because team mate Jurgen van den Broeck, fourth overall last year, became the first high-profile casualty when he could not start because of a knee injury he sustained in a pile-up on Wednesday.

France's Nacer Bouhanni and Swede Frederik Kessiakoff, who were also involved in Wednesday's crash, pulled out during the stage. Nairo Quintana had his left knee treated by the race doctor following a crash after the Colombian climber misjudged a turn after 55 kilometres.

Luis Angel Mate powered away from the pack and built a five-minute lead, but the Spaniard soon realised he had no chance on his own against the peloton. The Cofidis rider stopped his effort after one hour and was swallowed by the bunch.

With strong winds blowing on the way to Montpellier, tension was palpable in the peloton as top contenders looked to stay in front to avoid being caught in a possible split.

Cavendish, of Omega Pharma Quicke-Step, fell with 34 kilometres to go. There was no team mate to drag him back into the peloton and the Briton was forced to bunny-hop over roundabouts and make his own way through the team cars.

Cavendish had no juice left for the final sprint and he could not match Greipel's power.

Sagan (Cannondale) retained the green jersey for the points classification with 159 points ahead of Greipel (130) and Cavendish (119).