Colombian Santiago Buitrago climbed to victory in Friday's 19th 'Queen' stage of the Giro d'Italia with Britain's Geraint Thomas holding the leader's pink jersey.
The 23-year-old Bahrain rider, winner of a stage in last year's Giro, crossed the line alone 51sec ahead of Canadian Derek Gee of Israel Premier Tech, who was second for the fourth time in this year's race.
Thomas accelerated late but could not hold off a counter-attack from Primoz Roglic.
Joao Almeida stayed third but lost time on the gruelling 183km ride from Longarone to Tre Cime di Lavaredo in the Italian Dolomites that included five significant peaks.
"When I went for it with 400m to go, I realised after 100m that 400m was a lot at this altitude," said Ineos Grenadiers' Thomas.
"I just tried to pace it. Roglic came past in the last 100m or so. I lost a couple of seconds on the line but it was nice to gain some time on Joao."
The Welshman retained the overall race lead by around 26 seconds on the Slovenian going into Saturday's penultimate stage, a fearsome 18.6km uphill time trial.
"It will be super close tomorrow," Thomas said.
"I think it will be exciting to watch but horrible to do."
A tearful Gee missed out again and sits second in both the king of the mountains and points classifications.
"I knew Buitrago was gone as soon as he caught me," said Gee.
"The acceleration was ridiculous. I just went full to the line. That hurt for sure.
"I might have got second a lot, but at least I gave myself a shot."
jk/ea/pb