Peter Sagan clinched his third stage win on this year's Tour de France as Geraint Thomas maintained his grip on the yellow jersey.

After three tough days of climbing, the 169.5-kilometer journey from Bourg d'Oisans to Valence was set up perfectly for the sprinters, although some of the big names were no longer in the saddle.

With Fernando Gaviria, Dylan Groenewegen and Andre Greipel among those unable to make it through the mountains, Sagan seized the chance to equal his best tally at a Tour, having also won a trio of stages in 2012 and '16.

The Bora-Hansgrohe rider dipped at the line to squeeze out Alexander Kristoff in a photo finish, with Arnaud Demare not too far behind in third place.

Philippe Gilbert tried his luck with a solo burst inside the final kilometer but was reeled in thanks to FDJ, which set the table for sprint specialist Demare, only to see its man miss out on glory.

Overall leader Thomas, meanwhile, came home safely in the peloton to remain one minute and 39 seconds ahead of nearest rival — and Team Sky colleague — Chris Froome.

Slo-vak to the future

After two days in which the story was all about who was wearing yellow, Friday's focus was the man in green.

World champion Sagan extended his cushion in the points classification — he now sits the small matter of 228 clear of second-place Kristoff, following the withdrawal of Gaviria.

"This stage was a piece of gold for us [after the mountains]," Sagan told Eurosport. "It's fantastic. It was a flat stage and everyone in the group recovered, and I think everyone is happy it was a relaxed stage."

Recovery was the only aim for the leading contenders in the general classification, as Thomas, Froome and Dutchman Tom Dumoulin all conserved energy with tougher stages ahead.

Stage 13 results

1. Peter Sagan (Bora-Hansgrohe) 3:45:55
2. Alexander Kristoff (Team Emirates) 
3. Arnaud Demare (Groupama-FDJ)
4. John Degenkolb (Trek-Segafredo)
5. Greg van Avermaet (BMC Racing)

Classification standings  

General Classification 
1. Geraint Thomas (Team Sky) 53:10: 38
2. Chris Froome (Team Sky) +1:39
3. Tom Dumoulin (Team Sunweb) +1:50

Points 
1. Peter Sagan (Bora-Hansgrohe) 398
2. Alexander Kristoff (UAE Team Emirates) 170
3. Arnaud Demare (FDJ) 133

King of the Mountains 
1. Julian Alaphilippe (Quick-Step Floors) 84
2.Warren Barguil (Team Fortuneo-Samsic) 70
3. Serge Pauwels (Team Dimension Data) 63

Up next …

The journey from Saint-Paul-Trois-Chateaux to Mende stretches 188km, with the final few uphill as Saturday's stage concludes with a short climb.