Slovenia's Jan Tratnik won his first Grand Tour stage with a victory at the Giro d'Italia ©Getty Images

Slovenian rider Jan Tratnik of Bahrain McLaren won his first Grand Tour stage after making a late move on fellow breakaway companion Ben O'Connor at the Giro d'Italia.

Tratnik defeated the Australian on the final steep climb in San Daniele del Friuli after the pair had whittled down the field together on the 16th stage, a 229 kilometres journey from Udine.

Italian Enrico Battaglin, a team mate of Tratnik, won the sprint in the chase group to finish third, 1min 14sec behind.

"These last days were special because we're close to Slovenia these last four stages," said Tratnik.

"Today was special because it was really close.

"In the finish my brother and my girlfriend (were there).

"I wanted to make something because for me this is the last because now hard stages are coming."

Both were part of an initial breakaway, but none of the main general classification riders were part of the move.

This allowed Portugal's pink jersey leader João Almeida to keep tabs on his opponents, including Wilco Kelderman of the Netherlands, Australia's Jai Hindley and Britain's Tao Geoghegan Hart.

In the final kilometre, Almeida pushed on to extend his lead by a further two seconds over the trio and now leads Kelderman by 17 seconds.

Hindley and Hart sit 2:58 and 2:59 behind, respectively.

"Sometimes the best defence is attacking and that's what I did today," Almeida said.

"I tried, why not - when it's steep like this, everyone's spent energy so I think it was good.

"It's been more and more mental [game] and for sure you need to have the legs. 

"As I said, sometimes the mind is more important. 

"I cannot have any more confidence than this, it's been crazy for me - really good - and I'm really thankful for my whole team. 

"Let's see how far I can go - I'm confident but I'm ready for the worst."

Tomorrow's 17th stage will see the riders return to the mountains for the first of two days from Bassano del Grappa to Madonna di Campiglio in the Italian Alps.

Today marked the first of six straight days of racing, with the Giro d'Italia ending with a time trial finishing in Milan on October 25.

Colombian Fernando Gaviria, who won the points classification race in 2017 at the Giro d'Italia, has had to abandon the race after testing positive for COVID-19.

A team staffer from the AG2r-La Mondiale also tested positive, with both individuals being removed from the race and placed into isolation.

UAE-Emirates rider Gaviria has now tested positive for the virus for a second time this year, but appears to be asymptomatic.

"After undergoing a PCR (Polymerase chain reaction) test on yesterday's Giro d'Italia rest day, UAE Team Emirates' Fernando Gaviria has tested positive for COVID-19," UAE-Emirates said in a statement.

"All other riders and staff returned a negative test, and will undergo further testing today."