The first mountain stage of the race, a 168km ride from Castel di Sangro to Tagliacozzo, came down to Ayuso having the legs to get away from his rivals in the final 400 metres, with his UAE Team-Emirates colleague Isaac del Toro coming second.
Colombian Egan Bernal (Ineos Grenadiers) was third, denying Roglic (Red Bull–Bora–Hansgrohe) a place on the podium, but the Slovenian did take the pink leader's jersey from Mads Pedersen, with the Dane losing touch on the final climb.