France's Victor Lafay of Cofidis won stage eight of the Giro d'Italia on Saturday as Hungarian Attila Valter of Groupama-FDJ kept hold of the overall race lead on a 170km run from Foggia to Guardia Sanframondi.
The chief contenders for the 21-stage race, Egan Bernal and Remco Evenepoel, finished together on the eve of a major mountain-top finish Sunday when a shake up is expected.
Lafay bagged his first professional win and a first for Cofidis at the Giro in 11 years after joining a long range escape group of nine riders.
This group opened a seven-minute gap over the main peloton on the chief difficulty of the day, a 20km climb known as the Boca della Selva.
The 25-year-old Lafay kept his powder dry before pulling away with ease on the final shorter but steeper 3km climb through olive groves and vineyards to Sanframondi.
"It was difficult to get away, but the peloton allowed us seven minutes, that kind of climb is where I'm best so I just waited for my moment," said Lafay.
Valter, Bernal and Evenepoel all crossed the line 4min 48sec later.
The 22-year-old Valter will race a third day in the overall leader's pink jersey.
"There were fans shouting my name and it'll be great to ride in the lead one more day, but tomorrow will be really, really hard for sure," said the Hungarian.
The ninth stage features three steep climbs, the final one of which has a dirt surface section almost guaranteed to shake up the top of the rankings with 2019 Tour de France winner Bernal and the rookie Evenepoel looking strongest for now.
Australian Caleb Ewan pulled out of the Giro some 35km into the eighth stage, having been dropped by the main pack in the frantic early running as the escape group formed.
Ewan was complaining of a sore knee and had planned to pull out before the end of the Giro as he is scheduled to race the Tour de France and the Vuelta a Espana later in the season.
The 26-year-old Lotto Soudal leader won stage five earlier in the week and stage seven on Friday, and was leading the sprint points classification.