Mikel Nieve broke away to win stage 13 of the Giro d'Italia and Andrey Amador took the overall lead from Bob Jungels to record a historic landmark on Friday.
Nieve made his move on the penultimate climb on the 170-kilometre route from Palmanova to Cividale del Friuli and there was no catching the Team Sky rider.
The Spaniard finished 43 seconds ahead of Giovanni Visconti (Movistar), winning the second Giro stage of his career five years after his first success in the famous race, with Team Sky leader Mikel Landa having withdrawn due to illness three days prior.
"It was a plan that after Mikel Landa abandoned we had the obligation to win a stage. Today it was possible and we tried full gas since the start." he said.
"We will try again [for a stage win]. We won today, tomorrow is also hard, and we will try during all the mountain stages. Our priority now is to win stages."
While it was a day to remember for Nieve, it proved to be one to forget for Jungels as he lost the maglia rosa to Movistar's Amador.
Amador became the first Costa Rican to lead the Giro after Jungels slipped back on a challenging mountain stage and is now 26 seconds off the pace in second.
Jungels was unable to keep up with the group of fellow general classification contenders and it proved to be Amador who took advantage on a tough day which included four categorised climbs.
Vincenzo Nibali is 41 seconds adrift of the new leader after the Astana man took third place, crossing the line more than a minute behind the impressive Nieve.
Alejandro Valverde (Movistar) and Steven Kruijswijk (Lotto NL - Jumbo) are 43 seconds back ahead of Saturday's gruelling 210km stage from Farra d'Alpago to Corvara.