A slightly mountainous stage 8 was one for the breakaway, with Victor Lafay (Cofidis) taking the victory. Francesco Gavazzi (Eolo-Kometa) crossed the line 35 seconds later to take second, followed by Nikias Arndt (DSM) in third. Attila Valter (Groupama-FDJ) finished with the main peloton and held onto the pink jersey ahead of stage 9.
The leading group of nine cooperated with each other until just under 20 km to go when Victor Campenaerts (Qhubeka ASSOS) initiated the first attack. Inside 10 km to go the advantage for the breakaway had dropped to 5’56”, as more attacks flew and Fernando Gaviria (UAE-Team Emirates) was distanced. The break finally crumbled as Campenaerts and Giovanni Carboni (Bardiani-CFS-Faizanè) set off ahead of a chasing Alexis Gougeard (AG2R Citroën).
On the final climb to Guardia Sanframondi, Carboni left Campenaerts behind to ride the final 3 km climb to the finish only to be caught and passed by Lafay.
The main peloton hit the final ascent led by EF Education-Nippo. On the finishing straight the Ineos Grenadiers took over the pacemaking to bring Egan Bernal to the finish safely along with the rest of the general classification hopefuls.
Giro d'Italia (2.UWT) Foggia → Guardia Sanframondi