San Sebastian - Poland's Michal Kwiatkowski won a five-way battle for the line as the 232-kilometre San Sebastian one-day Classic culminated with a thrilling finale on Saturday.
It was a third classic win this season for Kwiatkowski, who helped Sky teammate Chris Froome maintain his grip on the yellow jersey in the Tour de France that ended last Sunday.
In a ferocious struggle to the line between mainly climb and hilly terrain specialists the 2013 winner Tony Gallopin of France was second and last year's victor Bauke Mollema of the Netherlands was third.
The 2014 world road race champion punched the air after winning by less than a bike length, while Giro d'Italia winner Tom Dumoulin looked forlorn finishing in the same time in fourth place.
Sky's Mikel Landa, fourth on the Tour de France, was fifth 2sec adrift.
"Such amazing Basque Spanish guys in the team today," Kwiatkowski said after the race in reference to Landa and Mikel Nieve.
"You could see Mikel Landa playing his crucial role in the end, and I could go for the sprint easily. I'm very thankful to Mikel that he waited in the group in the front. Today was just amazing, the team spirit, we believed that we could win the race."
Olympic champion Greg van Avermaet was many people's favourite but he ran out of steam chasing the lead trio to finish eighth.
Landa had led Mollema and Gallopin over the last hill but Kwiatkowski and Dumoulin showed great power to bridge the gap and force a fan friendly five-rider finale.
Kwiatkowski was the first ever Pole to win at San Sebastian, in its 37th edition, after a slog of five hours, 52 minutes and 53 seconds.
It was also the 27-year-old's third classic win of the season after Milan-SanRemo and Strade Bianche.
The race was run over rolling, hilly terrain through Basque Country with several difficult climbs including the category-one Jaizkibel mountain and also three treacherous descents.
A breakaway included local talent but 39-year-old veteran racer Haimar Zubeldia was reeled in 55km from home after taking a lead of over five minutes with the Sky team putting down a harsh rhythm.
Sky's Gianni Moscon then led a 15-man break on the category 2 climb at the Puerto de Arkale climb with 20km to go.
But again the attack was neutralised with 10km to go and their maximum lead never got past 30 seconds.
Results of the San Sebastian Classic, a 232km hilly ride around the Spanish seaside resort, on Saturday:
1. Michal Kwiatkowski (POL/SKY) 5hr 52min 53sec, 2.Tony Gallopin (FRA/LTS) same time, 3. Bauke Mollema (NED/TFS) s.t., 4. Tom Dumoulin (NED/SUN) s.t., 5. Mikel Landa (ESP/SKY) at 2sec, 6. Alberto Bettiol (ITA/CDT) 28sec, 7. Anthony Roux (FRA/FDJ) 38sec, 8. Greg Van Avermaet (BEL/BMC) s.t., 9. Tiesj Benoot (BEL/LTS) s.t., 10. Nicholas Roche (IRL/BMC) s.t.