Last updated on .From the section Cycling

Peter Sagan is now fourth overall

Tour de France: 1-23 July Coverage: Live text commentary of every stage on the BBC Sport website. BBC Radio coverage on 5 live sports extra and/or website from 14:30 BST on every stage.

World champion Peter Sagan won an uphill sprint to claim stage three of the Tour de France as Britain's Geraint Thomas retained the yellow jersey.

Sagan showed remarkable composure and skill to clip his foot back into his pedal after it slipped out as he started his sprint in the final 300m.

The 27-year-old Slovak held on to beat Australia's Michael Matthews.

Thomas finished two seconds adrift, alongside defending champion Chris Froome and the other race favourites.

The Team Sky duo lead the overall standings with Welshman Thomas 12 seconds ahead of team leader Froome, who is chasing a fourth Tour win in five years.

"There were no crashes, which was good, but it was a really hectic final," said Thomas. "I'm happy to get through unscathed."

Another day, another yellow jersey. Geraint Thomas extended his overall race lead on stage three

Sagan shows his class

The uphill drag to the finish seemed perfect for Bora-Hansgrohe rider Sagan. At only 1.6km long it was tough enough to remove the pure sprinters from contention but not long enough to give the climbing specialists an advantage.

Sagan is a rider who falls neatly between the two and although there were at least a dozen riders who could have won the stage, none have the swagger and poise of Sagan.

He hit the front about 500m from the line and looked nonchalantly over his shoulder at his rivals, who were on the limit, while he barely seemed to be pedalling.

"It was a strange finale," said Sagan. "Richie Porte went hard in the last 700-800m. I tried to catch him but when I caught him I saw how much was left, 400m. I said 'no, it's too much', so I relaxed a bit before going again."

Sagan is trying to win a sixth successive green jersey, to equal Erik Zabel's mark

However, when the effort came, it almost proved his undoing. His right foot slipped off the pedal and although he had clipped back in within a fraction of a second, the momentum seemed to be lost.

But he kept calm and powered to his eighth Tour stage win and, although Marcel Kittel retains the green jersey, Sagan's victory showed he is the most likely to win the points classification for a joint record sixth consecutive year.

He laughed off questions about the pressure of being the stage favourite, adding: "At the end I did unclip, I don't know why. I was thinking 'what's going on?' I was unlucky but I managed to go again and I won. I'm delighted."

How the stage unfolded

American Nathan Brown, who was in the day's main breakaway, picked up enough points over the first three of the day's five categorised climbs to take the polka dot King of the Mountains jersey off his Cannondale-Drapac team-mate Taylor Phinney.

And Mark Cavendish showed his sprinting prowess by winning the intermediate sprint from the peloton to pick up some minor points in the green jersey race.

But the real racing began in the final 40km as teams jostled for position before the day's final climb.

Belgian riders Philippe Gilbert and Greg van Avermaet had both picked today as a possible stage win, while the general classification riders were wary of losing any seconds to their rivals.

Van Avermaet was the most animated on the ascent of Cote des Religieuses in Longwy but it was his BMC Racing team-mate Porte who made the first big move of the riders chasing the overall Tour win.

Australian Porte said his move was not premeditated but he realised "about 500m out it was a bit far" for him to reach the finish in front.

Spain's Alberto Contador, a two-time Tour winner, also briefly threatened, while Froome and Thomas remained vigilant without becoming too prominent.

In the end, Sagan proved too strong and they will all start stage four with the same time gaps.

Tuesday's fourth stage is a 207.5km race from Mondorf-les-Bains to Vittel and it is expected to end in a bunch sprint finish.

Stage four is a third successive stage of more than 200km

There will be live text commentary of stage four on the BBC Sport website, with live radio commentary from 14:30 BST.

Stage three result:

1. Peter Sagan (Svk/Bora) 5hrs 07mins 19 secs

2. Michael Matthews (Aus/Team Sunweb) Same time

3. Dan Martin (Ire/Quick-Step Floors)

4. Greg van Avermaet (Bel/BMC Racing)

5. Alberto Bettiol (Ita/Cannondale-Drapac) +02secs

6. Arnaud Demare (Fra/FDJ) Same time

7. Jakob Fuglsang (Den/Astana)

8. Geraint Thomas (GB/Team Sky)

9. Chris Froome (GB/Team Sky)

10. Rafal Majka (Pol/ Bora)

General classification after stage three:

1. Geraint Thomas (GB/Team Sky) 10hrs 00mins 31secs

2. Chris Froome (GB/Team Sky) +12secs

3. Michael Matthews (Aus/Team Sunweb) Same time

4. Peter Sagan (Svk/Bora) +13secs

5. Edvald Boasson Hagen (Nor/Dimension Data) +16secs

6. Pierre Latour (Fra/AG2R) +25secs

7. Philippe Gilbert (Bel/Quick-Step) +30secs

8. Michal Kwiatkowski (Pol/Team Sky) +32secs

9. Tim Wellens (Bel/Lotto) Same time

10. Nikias Arndt (Ger/Team Sunweb) +34secs

Selected others:

18. Simon Yates (GB/Orica-Scott) +45secs

20. Richie Porte (Aus/BMC Racing) +47secs

21. Nairo Quintana (Col/Movistar) +48secs

24. Romain Bardet (Fra/AG2R) +51secs

26. Fabio Aru (Ita/Astana) +53secs

27. Alberto Contador (Spa/Trek-Segafredo) +54secs

29. Jakob Fuglsang (Den/Astana) Same time