Britain's Geraint Thomas reclaimed the overall race lead at the Giro d'Italia as Joao Almeida took victory on Monte Bondone in a thrilling 16th stage.
After appalling weather marred the Giro's first two weeks, the general classification race ignited on Tuesday with Thomas, 36, making his move.
The Briton finished runner-up in a sprint to the line with Almeida, who he now leads by 18 seconds overall.
Primoz Roglic is 29 seconds behind Thomas after his third-place finish.
"It would have been nice to win the stage but I had to keep riding, we didn't want to play cat and mouse with Roglic behind," Thomas said.
"He led it out and got the jump on me and unfortunately he won the sprint. But it's nice to be back in pink and to gain some time."
After clinching his first Giro stage win, UAE Team Emirates rider Almeida said: "I'm super happy, it's a dream come true. After four years I was so close and finally I got it."
Stage 17 on Wednesday is a flat 195km route from Pergine Valsugana to Caorle, before three more challenging mountain stages.
How stage 16 unfolded
Following a fortnight overshadowed by heavy rain, Covid-19 withdrawals and crashes, the battle for the maglia rosa took centre stage on Tuesday as Thomas made a statement with five stages remaining.
The highly anticipated 203km stage from Sabbio Chiese to the Monte Bondone summit included an elevation gain of 5,200m, with a steepest gradient of 15% on the final climb.
Thomas, the 2018 Tour de France champion, began the day one minute and eight seconds behind France's Bruno Amirail of Groupama-FDJ, whom he lost the lead to on stage 14.
But, with Amirail already detached from a reduced lead group, Almeida attacked inside the last five kilometres and Thomas was the only rider able to follow.
The pair pushed on, establishing a sizeable lead as Sepp Kuss worked to keep Jumbo Visma team-mate Roglic in touch, with Thomas' preceding efforts meaning Almeida was able to take the stage win.
Roglic was able to limit his losses to 25 seconds - coming in alongside Ireland's Eddie Dunbar - to ensure the Slovenian remains firmly in contention.
Italy's fourth-placed Damiano Caruso is two minutes 50 seconds behind Thomas, while former leader Amirail dropped to seventh.
There was some bad news for Thomas, who turns 37 on Thursday, with Pavel Sivakov's mid-stage withdrawal leaving him with four Ineos team-mates.
General classification
1. Geraint Thomas (GB/Ineos Grenadiers) 67hrs 32mins 35sec
2. Joao Almeida (Por/UAE Team Emirates) +18secs
3. Primoz Roglic (Slo/Jumbo-Visma) +29secs
4. Damiano Caruso (Ita/Bahrain Victorious) +2mins 50secs
5. Eddie Dunbar (Ire/Team Jayco AIula) +3mins 03secs
6. Lennard Kamna (Ger/Bora-Hansgrohe) +3mins 20secs
7. Bruno Armirail (Fra/Groupama-FDJ) +3mins 22secs
8. Andreas Leknessund (Nor/Team DSM) +3mins 30secs
9. Thymen Arensman (Ned/Ineos Grenadiers) +4mins 09secs
10. Laurens De Plus (Bel/Ineos Grenadiers) +4mins 32secs