Alberto Bettiol of EF Education won the 18th stage of the Giro d'Italia, the longest of the race at 231 kilometres, on Thursday in Stradella.
Bettiol hunted down Frenchman Remi Cavagna of Deceuninck who had escaped from a big breakaway group with 26 kilometres to go and finished 15 seconds ahead of fellow Italian Simone Consonni.
"It was a really emotional stage, it was a really hard stage," said Bettiol after his first career victory in Italy.
"It was really warm finally, because it's been a really tough and a really cold Giro. Finally the sun comes out."
The main peloton, including the overall leader, Colombian Egan Bernal of Ineos, finished 23 minutes and 30 seconds after Bettiol.
The breakaway of 23 riders took shape in the first hour of the race on a large flat stage from Rovareta to Stradella which gave the main contenders a chance to recover before the Giro heads back into the mountains.
Cavagna, a time trial specialist, burst clear with 26 kilometres to go.
But Bettiol chased the Frenchman down through the vineyards of Oltrepo, and Cavagna cracked on final short climb.
"I was really scared of Cavagna because he is such a strong guy," Bettiol said.
"But on the last climb when I saw him in front of me, I caught him and I immediately attack. I tried to beat him mentally."
Bettiol rode the last seven kilometres alone for the third victory of his career and his team's first in this year's Giro.
He said at the end that his focus was working for the team.
Bettiol has been working as a wingman for EF team leader Hugh Carthy in the mountains and led the Englishman across the finish line on Wednesday after a tough climbing stage.
Bettiol said that he was pleasantly surprised by his form on Thursday.
"The final 40k were very hard," he said. "Fortunately I still had good legs, yesterday was really, really tough for me supporting Hugh Carthy. Our goal is still with him to try to put him in the podium."
"From tomorrow, for the last two stages I am back with him, but today I enjoyed the day."
Like Carthy, Bernal struggled at the end of Wednesday's climb, though he still leads second-place Damiano Caruso by 2min 21sec.
He said Thursday's long largely flat stage did not prove he had recuperated.
"It's difficult to know because it was really fast but I was in the wheels so it was a bit easier," the Colombian said.
"I felt much better than yesterday on the bike. I hope tomorrow will be another good day."
Bernal kept the maglia rosa for a ninth straight day, eclipsing the Colombian record of eight days in pink set by Nairo Quintana who won the Giro in 2014.
"It's something special, but the most important is to arrive in the maglia in the final stage," Bernal said before refusing to say he was confident of victory.
"We saw yesterday that with one bad day you can lose everything. I need to be focussed and do my best."
On Friday, the 166km 19th stage from Abbiategrasso finishes with a tough climb up Alpe Merra but has been rerouted to avoid the climb of the Mount Mottarone, out of respect for the victims of the cable car accident there last Sunday.