French cyclist Victor Lafay won the eighth stage of the Giro d’Italia for the first victory of his professional career and Attila Valter kept the pink jersey on Saturday.

Lafay, who rides for Cofidis, attacked on the steep uphill finish of the 170-kilometer (106-mile) leg from Foggia to Sanframondi and soloed to victory.

Lafay raised his arms and beamed in delight as he crossed the line 36 seconds ahead of Francesco Gavazzi. Nikias Arndt was third, a second further back.

Cyclists ride during the eighth stage of the Giro d'Italia cycling race, from Foggia to to Guardia Sanframondi, Italy, Saturday, May 15, 2021.  (Fabio FerrariLaPresse via AP)

Cyclists ride during the eighth stage of the Giro d'Italia cycling race, from Foggia to to Guardia Sanframondi, Italy, Saturday, May 15, 2021. (Fabio FerrariLaPresse via AP)

All three were part of a nine-man breakaway about a third of the way through the stage.

Valter finished safely in the peloton to remain 11 seconds ahead of Remco Evenepoel overall, and 16 seconds ahead of Egan Bernal.

Caleb Ewan, who won the previous two stages, left the Giro halfway through the day. The Australian cyclist had always planned to leave the race before the finish in Milan and his Lotto Soudal team said he was feeling pain in his knee.

Cyclists ride during the eighth stage of the Giro d'Italia cycling race, from Foggia to to Guardia Sanframondi, Italy, Saturday, May 15, 2021.  (Fabio FerrariLaPresse via AP)

Cyclists ride during the eighth stage of the Giro d'Italia cycling race, from Foggia to to Guardia Sanframondi, Italy, Saturday, May 15, 2021. (Fabio FerrariLaPresse via AP)

Sunday’s ninth stage features another summit finish as well as three other categorized climbs, on the 158-kilometer (98-mile) route from Castel di Sangro to the ski resort of Campo Felice.

The Giro finishes on May 30 in Milan.

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

Cyclists ride during the eighth stage of the Giro d'Italia cycling race, from Foggia to to Guardia Sanframondi, Italy, Saturday, May 15, 2021.  (Fabio FerrariLaPresse via AP)

Cyclists ride during the eighth stage of the Giro d'Italia cycling race, from Foggia to to Guardia Sanframondi, Italy, Saturday, May 15, 2021. (Fabio FerrariLaPresse via AP)