CIVIDALE DEL FRIULI, Italy (AP) Andrey Amador became the first rider from Costa Rica to wear the pink jersey at the Giro d'Italia, while Mikel Nieve won the first big mountain stage on Friday.
Nieve got into a breakaway and launched a solo attack on the third of four categorized climbs in Stage 13.
A Spaniard with Sky, Nieve clocked just over 4 1/2 hours over the 170-kilometer (106-mile) route from Palmanova to Cividale del Friuli.
Nieve finished 43 seconds ahead of second-place Giovanni Visconti, and 1:17 ahead of third-place Vincenzo Nibali, who edged overall rival Alejandro Valverde in a sprint for the final podium spot.
Amador, Valverde's Movistar teammate, also finished 1:17 behind.
In the general classification, Amador leads previous leader Bob Jungels by 26 seconds.
Nibali was third, 41 seconds behind, and Valverde fourth, 43 seconds back.
''I'll do my best to enjoy this experience,'' said Amador, the son of a Russian mother and a Costa Rican father. ''The truth is that Alejandro Valverde is very strong, and my move to the top spot doesn't change anything. He's our captain and I'm racing for him.''
It was Nieve's third stage win at a Grand Tour, having taken victories at the 2010 Spanish Vuelta and 2011 Giro, and it gave Sky some relief after team leader Mikel Landa abandoned due to illness during Stage 10.
''Today's attack was kind of planned,'' Nieve said. ''To go on the attack for a stage victory was the only thing we could do after Mikel Landa abandoned. I went full gas.''
Visconti fell hard while sprinting against Damiano Cunego for points on the first climb of the day but managed to get medical attention while in the saddle and continue.
Nibali, the 2013 Giro winner and 2014 Tour de France champion, gained a four-second bonus for his third-place finish and leapfrogged Valverde in the standings.
Nibali also attempted an attack on the penultimate climb to Cima Porzus but was quickly chased down by Valverde. Then Amador showed off his downhill skills at the front on a technical descent.
Jungels stayed with the other leaders for most of the day but was dropped on the way up to Porzus.
Sprinters Andre Greipel and Caleb Ewan withdrew before the stage began.
The stage was held in the Friuli-Venezia Giulia region in northeastern Italy, near the border with Slovenia.
On Saturday, the race's ''queen'' stage features six classified climbs - including the Passo Pordoi, the Passo Sella, and the Passo Giau - on a spectacular 210-kilometer (131-mile) route through the heart of the Dolomite Range from Alpago to Corvara.
On Sunday, there's an 11-kilometer (7-mile) mountain time trial from Castelrotto to Alpe di Siusi.
''We have two very hard days ahead,'' Amador said. ''It's great to go into it with the Maglia Rosa (pink jersey).''
Meanwhile, organizers were working to clear five meters (yards) of snow off the Colle dell'Agnello pass, the highest point of the race at an altitude of 2,744 meters (9,000 feet), which is featured in Stage 19.
The race ends next weekend in Turin.