Arnaud Demare held off Peter Sagan and Davide Ballerini to win stage four of the Giro d'Italia on the day that pre-race favourite Geraint Thomas was forced to withdraw.
Team INEOS rider Thomas sustained a pelvis fracture when riding over a drinks bottle prior to the start of stage three and announced on Tuesday he was unable to continue.
That decision was taken shortly before an eventful leg in Villafranca Tirrena, with Groupama–FDJ's Demare sneaking in ahead of Sagan and Ballerini in a photo finish.
Bora-Hansgrohe's Sagan launched his sprint with a little under 200m to go, with Demare to his left, but he finished a matter of millimetres behind his rival.
Italian riders Ballerini, Andrea Vendrame and Elia Viviani completed the top five.
"I think it was a millimetre," Demare said in his post-race interview. "I had luck on my side. I often train for sprints behind my dad's scooter. It helped me for today.
"I wasn't sure if I had won when I crossed the line."
Joao Almeida finished the stage safely in the front group and extended his overall lead over closest challenger Jonathan Caicedo to two seconds, having taken bonus seconds on the second intermediate sprint.
The tense finish was somewhat overshadowed by a nasty crash involving Vini-Zabu riders Luca Wackermann and Etienne van Empel, who appeared to be taken out by barriers blown into their path by a low-flying race helicopter.