(Reuters) -Britain's Geraint Thomas took a big step towards winning his first Giro d'Italia as he avoided any significant time losses to Maglia Rosa rival Primoz Roglic in a brutal Queen Stage high in the Dolomites on Friday.
Colombia's Santiago Buitrago (Team Bahrain Victorious) crossed the Stage 19 finish line at Tre Cime Di Lavaredo in first place while behind him the battle for the overall lead raged on the fifth and final climb of the day.
Jumbo-Visma rider Roglic attacked with 1km remaining as the gradients ramped up to around 18% but Thomas (Ineos Grenadiers) responded and looked set to extend his lead, only for a final burst by Slovenian Roglic seeing him take back three seconds.
Thomas will take a 26-second lead into Saturday's penultimate stage which will see 1,050 metres of climbing packed into the last 9.8km of an 18.6km individual time trial.
Portugal's Joao Almeida remains in third place in the general standings but lost time in the final kilometre.
Buitrago broke the heart of Derek Gee, accelerating past the Canadian on the final climb to win the stage and leave Gee with his fifth second-placed stage finish of this Giro.
While Buitrago celebrated the biggest win of his career, the battle for the overall victory remains on a knife edge.
The 37-year-old Thomas, looking to add the Giro to his 2018 Tour de France, is in the box seat but he knows that everything will be decided on Saturday.
"It was okay today, when I went for it with 400m to go I realised that was a long way at this altitude," Thomas, who finished fifth on the stage, told Eurosport.
"Roglic came past in the last 100m or so and I lost a couple of seconds on the line but it was nice to gain some time on Joao and it will be super close tomorrow."
Thomas was brilliantly shepherded up the day's five snow-speckled climbs by his team mates with Thymen Arensman and Laurens De Plus emptying their tanks on the final ascent to the mountain-top finish at over 2,300 metre.
On Saturday he will be all alone as he tries to fend off Roglic. "It's going to be exciting to watch and horrible to do," Thomas said.
A day of more than 5,000 metres over 183km from Longarone was largely uneventful with a large breakaway group forming.
That was slowly whittled down and Gee attacked after conquering the Tre Croci Pass and built up a decent lead.
Straining every sinew he did his best to keep Buitrago behind him but the Colombian relentlessly ground him down before sprinting clear to victory.
Three-time Vuelta de Espana winner Roglic changed his bike at the foot of the day's final climb for one with a huge rear sprocket to give himself a lower gear for the finale.
But he was unable to crack Thomas who will be slight favourite heading in to Saturday's head-to-head.
(Reporting by Martyn HermanEditing by Christian Radnedge)