Belarussian Vasil Kiryienka, of the Tinkoff team, won the 19th stage of the Tour of Italy on Friday following a long breakaway but Spain's Alberto Contador said after retaining the overall lead the race was "wide open."

The 228km stage from Legnano saw the riders return to the mountains and Kiryienka held on for victory at this summit finish.

With two days to go till the finish in Milan, reigning Tour de France champion Alberto Contador only has a four-second lead over Italy's Riccardo Ricco, who attacked near the end of the stage.

Astana rider Contador said afterwards things had not been easy. "It was a very long and difficult day and the stage was longer than had been announced in the schedule," he said, giving praise to rivals by saying: "Compliments to Ricco and Di Luca because they had a great day."

But it was reigning Giro champion Danilo Di Luca who made up most ground, in third spot overall 21 seconds behind the leader.

Di Luca attacked in the descent at Vivione behind the wheel of team-mate Paolo Savoldelli of Italy about 45 kilometres from the line.

The duo, accompanied by Italy's Vincenzo Nibali, surged ahead of the Contador group, and Di Luca kept up the pace over the closing kilometres on the climbs at Presolana, then Monte Pora, before gaining second place in the stage more than four and a half minutes from Kiryienka.

Ricco made a breakaway from the Contador group with four kilometres to go till the line to gain 37 seconds on the overall leader.

Italy's Gilberto Simoni, third overall at the start of the stage, was left behind at the Presolana climb and was not able to keep up with the pace of Contador and the other challengers for overall victory.

The 26-year-old Kiryienka, world champion in the points race on the track in Manchester at the end of March, won his first Giro stage having already earned two runners-up spots — at Pescocostanzo (7th stage) and at Alpe de Pampeago (14th stage).

Kiryienka said afterwards: "I promised my team at the start of the Giro that I would make three breakaways and I have done that, twice finishing second and now I have won a stage. I would like to thank my team and my sporting directors (Orlando Maini and Dimitry Konyshev) who encouraged me during the stage."

Saturday's 20th stage, the last in the mountains, is a 224km run between Rovetta and Tirano with two major climbs, before the finish of the race on Sunday with the 21st stage final time trial.