Viviani surfed the draft of his lead-out teammates Michael Morkov and Max Richeze and then put in a burst of speed in the closing meters to beat Alexander Kristoff (UAE-Team Emirates) by the width of a bike tire.
Caleb Ewan (Lotto-Soudal) finished a close third, just ahead of Peter Sagan (Bora-Hansgrohe). Overnight leader Julian Alaphilippe (Deceuninck-Quick Step) retained the yellow jersey.
The victory brings Viviani his first career stage victory at the Tour de France after he was a non-factor in Saturday’s opening sprint stage in Brussels. The Italian fast man already owns five stage victories at the Giro d’Italia and three stage wins at the Vuelta a Epsaña.
“It does mean a lot, and I cannot believe it. It was a big goal of the team here,” Viviani said after crossing the line. “We missed the first chance to win and put on the yellow jersey, but yesterday after Julian’s phenomenal ride, it’s the moment when you switch on the team, and today we do a perfect job.”
The bunch sprint came after a dramatic final 15 kilometers that saw the peloton accelerate over the Cote De Maron, a fourth category climb that appeared to be a launchpad for a late move. A fast pace set by Team Sunweb kept the peloton together, however shortly after the climb there was an attack from French rider Liliane Calmejane (Total-Direct Energie).
Calmejane’s hovered just ahead of the peloton for several kilometers, but a fast pace set by Deceuninck-Quick Step and Lotto Soudal eventually brought the French rider back into the bunch with five kilometers remaining.
Deceuninck dominated the final kilometer push to the line, with Morkov accelerating around a swooping left-hand turn just before the final drag to the line. Richeze was next to surge on the front of the peloton, and his burst came with Viviani just on his wheel.
Viviani was challenged by Kristoff in the final push; the big Norwegian rider was put into an ideal position by his Belgian teammate Jasper Philipsen. But in the end, it was Viviani who finished the job.
“I was just really focused on my lead out because I lost the wheel of my lead out in the first stage,” Viviani said. “I [saw] Kristoff try to anticipate me on my right, and on that moment I sprint. It was perfect teamwork.”
The final action came after a predominantly flat and twisting 12.5km stage through France’s northeast corner.
A three-man breakaway containing CCC Team’s Michael Schar and Wanty-Gobert duo Yoann Offredo and Frederik Backaert attacked from the gun and built a healthy lead within the stage’s opening 10km. The peloton kept the trio on a three-minute leash for the lion’s share of the stage, with riders from Deceuninck-Quick Step, Team Ineos, and Lotto Soudal all taking turns on the front.
Schar dropped his breakaway companions inside the final 20km, but the pack eventually reeled in the big Swiss rider just before the Cote De Maron.