Britain's Mark Cavendish won a crash-marred fifth stage of the Tour de France in Marseille on Wednesday as Australian Simon Gerrans retained the race leader's yellow jersey.

Cavendish, of the Omega-Pharma team, finished over a bike length ahead of Edvald Boasson Hagen (Sky) and Slovakian Peter Sagan (Cannondale) in a reduced bunch sprint after they had avoided a crash inside the final kilometre.

It was the Isle of Man rider's 24th stage win on the race and left him only 10 short of equalling the absolute record of 34 held by Belgian legend Eddy Merckx.

A month after winning five stages at the Giro d'Italia, Cavendish looks to be in unstoppable form but he was quick to pay tribute to his main lead-out man, Gert Steegmans.

"Gert took me in at such a speed and I just kept that speed going. I only had to accelerate in the final 150 metres. I'm super happy with that," added Cavendish, who in recent days has been recovering from a chest infection.

"I'm still not 100 per cent after being ill last week. But it's good to get the account open here at the Tour de France. The morale is good in the team and the only way to make it better is by winning more stages."

Early breakaway

On what was the second-longest stage (228.5 kilometre) of the 100th edition the peloton gave the green light to an early six-man breakaway which formed in the opening kilometres after Belgian Thomas De Gendt had gone on the attack.

By the 37km mark they had built a maximum lead of nearly 13 minutes on the main peloton, which only really decided to start the chase with a little over 100km remaining.

With Gerrans in the race leader's yellow jersey, Orica-GreenEdge spent long spells leading the bunch but with a stage win on a flat home straight up for grabs the other teams with top sprinters soon began sending riders to the front to boost the chase.

Sixty kilometres from the finish the lead had halved to just over six minutes and 10km further on the lead group was split in two as De Gendt, Yukiya Arashiro and Alexey Lutsenko - a former under-23 world champion who is making his race debut with Astana - left their companions behind.

Not wanting to miss out on contending a possible stage win, Arashiro's Europcar teammate Kevin Reza, also a race debutant, dug deep to bridge the gap.

The quartet's lead over the main bunch, however, had been trimmed to 5:05 with 40km to race as riders from Argos, Lotto, and Omega-Pharma joined Orica in the hunt.

Attempts to pull clear at the front by Reza and then Arashiro came to nothing and despite a tough headwind on the Gineste climb the escapees appeared to have little chance of keeping the pack at bay.

It was on the Gineste, whose summit was 12 km from the finish, that a crash in the chasing bunch took down around a dozen riders.

The incident left no visible casualties but delayed several including German Marcel Kittel, the winner of stage one, and Orica's main sprinter Matt Goss.

"Today we had two objectives," Gerrans said. "To try and win the stage and keep the yellow jersey within the team.

"Matt Goss got distanced on the final climb but I still have the yellow jersey on my shoulders and I managed to stay up the front and stay out of trouble."

The main peloton crested the summit only 19secs in arrears and despite Lutsenko taking Reza with him with an ambitious attack the pair were reeled in in succession with 4km to go.

The Lotto team of German sprinter Andre Greipel took command of the race inside the final kilometre after a crash further behind had stopped much of the peloton in its tracks.

Greipel, however, could only finish fifth as Cavendish made his move inside the final 250 metres to claim his first win of this year's race.