World champion Peter Sagan won stage three of the Tour de France in a thrilling sprint finish at the end of a long day as Team Sky's Geraint Thomas retained the yellow jersey.
The last 2km saw a short, sharp climb in Longwy with up to 30 riders still in contention and Sagan looked to have lost crucial momentum in the closing stages when his foot slipped out of his pedal, but he retained his composure and powered on to just hold off a spirited charge from Matthews.
It is an eighth career stage win for Sagan, who is aiming to win the points leaders' green jersey for a record-equalling sixth time in a row.
Thomas finished eighth, two seconds behind Sagan, to retain yellow, with team-mate Chris Froome immediately behind in ninth.
It was a tight finish to an otherwise uneventful stage, which saw six riders breakaway and hold their lead at about two minutes for more than 150km.
|Thomas Voeckler of France and Team Direct Energie lead the peloton around the Spa F1 circuit|
That sparked a series of attacks out of the break, but, when Direct-Energie's Lilian Calmejane was the last to be swallowed up with 10km to go, the battle was on at the front of the peloton.
"At the end I did unclip, I don't know why. I was thinking 'whats going on?'," said Sagan. "I was unlucky but I managed to go again and I won, I'm delighted."
Thomas was relieved to emerge unscathed from a frantic finale.
"There were no crashes, which was good, but it was a really hectic final," he said. "I'm happy to get through unscathed."
American Nathan Brown took enough points over the day's five climbs to snatch the polka dot King of the Mountains jersey from his compatriot and team-mate Taylor Phinney.
Stage 3 Result
1 Peter Sagan (Svk) Bora-Hansgrohe 5:07:19
2 Michael Matthews (Aus) Team Sunweb
3 Daniel Martin (Irl) Quick-Step Floors
4 Greg Van Avermaet (Bel) BMC Racing Team
5 Alberto Bettiol (Ita) Cannondale-Drapac +2 seconds
6 Arnaud Demare (Fra) FDJ
7 Jakob Fuglsang (Den) Astana Pro Team
8 Geraint Thomas (GBr) Team Sky
9 Christopher Froome (GBr) Team Sky
10 Rafal Majka (Pol) Bora-Hansgrohe
1 Geraint Thomas (Gbr) Team Sky 10:00:31"
2 Chris Froome (Gbr) Team Sky +12"
3 Michael Matthews (Aus) Sunweb
4 Peter Sagan (Svk) BORA +13"
5 Edvald Boasson Hagen (Nor) Dimension Data +16"
6 Pierre Latour (Fra) AG2R +25"
7 Philippe Gilbert (Bel) Quick-Step +30"
8 Michal Kwiatkowski (Pol) Team Sky +32"
9 Tim Wellens (Bel) Lotto
10 Nikias Arndt (Ger) Sunweb +34"