Italian cyclist Alberto Bettiol timed his attack perfectly to win the 18th stage of the Giro d’Italia on Thursday for his first victory in a Grand Tour, and Egan Bernal kept the leader’s pink jersey at the end of the race’s longest leg.

Bettiol, who rides for EF Education–Nippo, had plenty of time to sit up on his bicycle and repeatedly lift up his hands to encourage the home fans that lined the route to cheer louder as he approached the finish line.

More Images
Italy's Alberto Bettiol celebrates as he wins the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. ( Gian Mattia D'AlbertoLaPresse via AP)

Italian cyclist Alberto Bettiol timed his attack perfectly to win the 18th stage of the Giro d’Italia on Thursday for his first victory in a Grand Tour, and Egan Bernal kept the leader’s pink jersey at the end of the race’s longest leg.

Italy's Alberto Bettiol pedals on his way to win the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)

Rémi Cavagna appeared to be heading for the win after attacking on the approach to the fourth-category Castana climb and crossing with a 28-second advantage, but Bettiol had set off in pursuit and caught and passed the French time-trial champion with about seven kilometers remaining.

France's Remi Cavagna pedals during the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)

Friday’s 19th stage has been modified to bypass the top-category climb of the Mottarone after a cable car disaster there killed 14 people on Sunday. The new, slightly-shorter route nevertheless includes three categorized climbs — including a top-classed one to the finish — on the 166-kilometer (103-mile) leg from Abbiategrasso to Alpe di Mera.

Cyclists pedal during the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)

Cyclists pedal during the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)

Egan Bernal, center, wearing the pink jersey of the overall leader, pedals during the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)

Egan Bernal, center, wearing the pink jersey of the overall leader, pedals during the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)

The 231-kilometer (144-mile) route from Rovereto to Stradella was mainly flat but ended with a series of short climbs through the rolling Pavia winelands.

Italy's Alberto Bettiol celebrates as he wins the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. ( Gian Mattia D'AlbertoLaPresse via AP)

Italy's Alberto Bettiol celebrates as he wins the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. ( Gian Mattia D'AlbertoLaPresse via AP)

Rémi Cavagna appeared to be heading for the win after attacking on the approach to the fourth-category Castana climb and crossing with a 28-second advantage, but Bettiol had set off in pursuit and caught and passed the French time-trial champion with about seven kilometers remaining.

Simone Consonni led the rest of the breakaway across, 17 seconds behind Bettiol. Nicolas Roche was third to complete an all-Italian podium.

Bernal crossed the line in the peloton, more than 23 minutes behind. The 2019 Tour de France champion maintained his lead of 2 minutes, 21 seconds over Damiano Caruso and 3:23 ahead of third-place Simon Yates.

Italy's Alberto Bettiol pedals on his way to win the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)

Italy's Alberto Bettiol pedals on his way to win the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)

Friday’s 19th stage has been modified to bypass the top-category climb of the Mottarone after a cable car disaster there killed 14 people on Sunday. The new, slightly-shorter route nevertheless includes three categorized climbs — including a top-classed one to the finish — on the 166-kilometer (103-mile) leg from Abbiategrasso to Alpe di Mera.

The Giro finishes on Sunday in Milan with an individual time trial.

More AP sports: https://apnews.com/hub/apf-sports and https://twitter.com/AP_Sports

France's Remi Cavagna pedals during the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)

France's Remi Cavagna pedals during the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)

Cyclists pedal during the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)

Cyclists pedal during the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)

Egan Bernal, center, wearing the pink jersey of the overall leader, pedals during the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)

Egan Bernal, center, wearing the pink jersey of the overall leader, pedals during the 18th stage of the Giro d'Italia cycling race, from Rovereto to Stradella, Italy, Thursday, May 27, 2021. (Fabio FerrariLaPresse via AP)