SAN DANIELE DEL FRIULI, ITALY -- Jan Tratnik earned his first victory in a Grand Tour by winning the 16th stage of the Giro d'Italia and Joao 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-kilometre (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 kilometre 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.

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 favourites across, nearly 13 minutes after Tratnik, and increased his lead slightly after attacking in the final two kilometres.

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.

Wednesday's 17th stage is a mountainous 203-kilometre (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.