MADONNA DI CAMPIGLIO, ITALY -- Joao Almeida remained in the overall lead of the Giro d'Italia as the race headed into the high mountains and Ben O'Connor earned his first stage victory in a Grand Tour by winning the 17th leg on Wednesday.

Almeida was part of the group of overall favourites that crossed the summit finish more than five minutes after O'Connor, and the Portuguese cyclist, who rides for the Deceuninck-Quick Step team, remained 17 seconds ahead of Wilco Kelderman.

Jai Hindley is third overall, 2:58 behind Almeida on the eve of the Giro's toughest stage.

The so-called “Queen stage” features four classified climbs, three of which are the highest category, on the 207-kilometre (128.6-mile) route from Pinzolo to Laghi di Cancano. One of those is the iconic Stelvio pass, which also has 48 hairpin turns.

Kelderman and Hindley, who both ride for Team Sunweb, tried to attack on the final climb up to Madonna di Campiglio but Almeida marked the moves.

“Today it was a hard day, a lot of climbing but I had the perfect team with me,” Almeida said. “That's one more day in the Maglia Rosa (pink jersey).

“Team Sunweb tried to attack but I was feeling good.”

O'Connor soloed to victory and was full of smiles as he crossed the line, having narrowly missed taking a stage victory Tuesday.

O'Connor, an Australian with the NTT Pro Cycling team, finished 31 seconds ahead of Hermann Pernsteiner at the end of the mountainous 203-kilometre (126-mile) leg from Bassano del Grappo to Madonna di Campiglio.

“Yesterday's second place left me feeling pretty bitter,” O'Connor said. “Today I was able to bounce back and get this success, it's a dream to get a victory in a Grand Tour.”

Thomas De Gendt was third, 1:10 behind O'Connor.

Wednesday's route also featured four classified climbs, three of which were the highest category

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