The Italian out-sprinted Alexander Kristoff (Katusha) and Sonny Colbrelli (Bahrain-Merida) to the win in Plouay, in what had been a race full of attacks.
No breakaway was able to fully establish itself during the race, with a number of moves being brought back.
Eventually Dries Devenyns (Quick-Step Floors), Sylvain Dillier (BMC), Tao Geoghegan Hart (Sky), Arnaud Gérard (Fortuneo-Oscaro), Paul Martens (LottoNL-Jumbo), Jacopo Mosca (Willier Triestina-Selle Italia), Pierre Rolland (Cannondale-Drapac) and Petr Vakoc (QuickStep Floors) got away but failed to establish a gap over a minute.
With that group brought back as those teams not present chased them down, only Dillier and Devenyns remained out front.
They held a gap of just under 20 seconds into the final 20 or so kilometres before Devenyns was unable to maintain the pace.
Cyril Gautier (Ag2r), Albert Bettiol (Cannondale-Drapac), Nathan Haas (Dimension Data), Hector Carretero (Movistar), Pieter Serry (Quick-Step), Lilian Calmejane (Direct Energie) and Julien Simon (Cofidis) were able to bridge across and join Dillier, carrying a decent lead into the final 10km.
Despite a number of solo attacks over the final kilometres of the course and the last climb, the sprinters’ teams did the job to pull things back together for their fast men.
In the end, no-one was able to match Viviani’s turn of speed as he pushed past Kristoff to take victory on the line, continuing to end his final months with Team Sky in style.
Bretagne Classic – Ouest France 2017 (239.7km)
1 Elia Viviani (Ita) Team Sky, in 5-31-29
2 Alexander Kristoff (Nor) Katusha-Alpecin
3 Sonny Colbrelli (Ita) Bahrain-Merida
4 Sep Vanmarcke (Bel) Cannondale-Drapac
5 Michael Matthews (Aus) Team Sunweb
6 Rúben Guerreiro (Por) Trek-Segafredo
7 Edvald Boasson Hagen (Nor) Dimension Data
8 Nacer Bouhanni (Fra) Cofidis, Solutions Credits
9 Simone Consonni (Ita) UAE Team Emirates
10 Greg Van Avermaet (Bel) BMC Racing Team, all same time