By Julien Pretot

ANGERS, France (Reuters) - Mark Cavendish joined France great Bernard Hinault in second place of the all-time list of Tour de France stage winners when he pipped Andre Greipel on Monday for his second victory in this year's race.

The Briton, riding for the Dimension Data team, beat German Greipel by less than a tyre's length to snatch his 28th career Tour win at the end of a 223.5-km ride from Granville.

Belgian Eddy Merckx, like Hinault a five-times Tour winner, still tops the list of stage wins with 34.

World champion Slovakian Peter Sagan (Tinkoff) retained the overall leader's yellow jersey after taking fourth place to stay in the hunt for a sixth green jersey for the points classification.

"It was a long day, I'm happy we did not suffer any crash today," said Sagan, whose team mate Alberto Contador, one of the favourites for the title who fell twice in the opening two stages, enjoyed a quiet day in the saddle.

"I'm in one piece, that's nice."

Sagan leads France's Julian Alaphilippe (Etixx-Quick Step) and Spaniard Alejandro Valverde (Movistar) by eight and 10 seconds respectively with defending champion Chris Froome (Team Sky) of Britain in fifth place, 14 seconds off the pace.

Armindo Fonseca (Fortuneo-Vital Concept) was the first attacker of the day and he built an 11-minute lead over a peloton that rode at snail's pace.

He was later joined by fellow Frenchman Thomas Vockler (Direct Energie), but their effort was doomed and the peloton, led by Marcel Kittel's Etixx-Quick Step's team, launched its effort.

German Kittel, however, was unable to sustain the pace in the final straight, a slightly uphill 30-metre dash to the line.

Frenchman Bryan Coquard (Direct Energie) was third.

Cavendish, who looked beaten with 50 metres left after Greipel's second acceleration, threw his bike well to add to his victory in the opening stage on Saturday.

"I've won by more, I've won by less," said Cavendish, the most successful sprinter in Tour history.

"Normally, I know when I won or I lose. When I crossed the line, I kind of knew I got it today but anything can happen," he added.

"I knew I had to come from behind. I wanted to be behind Greipel to launch my sprint. He took me by surprise but I'm happy I did it. My team mates were phenomenal."

Tuesday's fourth stage, the longest of this year's Tour with 237.5km from Saumur to Limoges, will give another chance for the sprinters to shine before the race hits the mountains.

(Editing by Ed Osmond)