Jan Tratnik earned his first victory in a Grand Tour by winning the 16th stage of the Giro d’Italia and João Almeida held on to the pink jersey on Tuesday.

Tratnik, a Slovenian rider with the Bahrain–McLaren team, beat Ben O’Connor by seven seconds at the end of the hilly 229-kilometer (142-mile) route from Udine to San Daniele del Friuli.

Neither of them had ever won a stage in a Grand Tour and both entered the final kilometer together. However, it was Tratnik who crossed the line first, with his arms outstretched and tears streaming down his face. O’Connor thumped the handlebars in frustration.

Race leader Joao Almeida, center, pedals with the pack during the 16th stage of the Giro d'Italia cycling race, from Udine to San Daniele del Friuli, Italy, Tuesday, Oct. 20, 2020.  (Massimo PaoloneLaPresse via AP)

Race leader Joao Almeida, center, pedals with the pack during the 16th stage of the Giro d'Italia cycling race, from Udine to San Daniele del Friuli, Italy, Tuesday, Oct. 20, 2020. (Massimo PaoloneLaPresse via AP)

Enrico Battaglin was third, 1:14 behind his Bahrain–McLaren teammate.

All three were part of a large breakaway of 30 riders, who escaped early in the stage, on the first of six classified climbs.

Almeida led the group of overall favorites across, nearly 13 minutes after Tratnik, and increased his lead slightly after attacking in the final two kilometers.

Cyclists pedal during the 16th stage of the Giro d'Italia cycling race, from Udine to San Daniele del Friuli, Italy, Tuesday, Oct. 20, 2020.  (Fabio FerrariLaPresse via AP)

Cyclists pedal during the 16th stage of the Giro d'Italia cycling race, from Udine to San Daniele del Friuli, Italy, Tuesday, Oct. 20, 2020. (Fabio FerrariLaPresse via AP)

The Portuguese rider, who rides for the Deceuninck-Quick Step team, moved to 17 seconds ahead of Wilco Kelderman.

Jai Hindley was third, 2:58 behind Almeida.

Colombian sprinter Fernando Gaviria withdrew from the race before the start of the stage after becoming the latest cyclist to test positive for the coronavirus.

Cyclists pedal during the 16th stage of the Giro d'Italia cycling race, from Udine to San Daniele del Friuli, northern Italy, Tuesday, Oct. 20, 2020.  (Fabio FerrariLaPresse via AP)

Cyclists pedal during the 16th stage of the Giro d'Italia cycling race, from Udine to San Daniele del Friuli, northern Italy, Tuesday, Oct. 20, 2020. (Fabio FerrariLaPresse via AP)

Wednesday’s 17th stage is a mountainous 203-kilometer (126-mile) leg from Bassano del Grappo to Madonna di Campiglio. The route features four classified climbs, three of which are the highest category.

The race was rescheduled from its usual May slot because of the coronavirus pandemic. The Giro ends on Sunday with an individual time trial in Milan.

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