Team Sky's Mark Cavendish was runner-up to Andrea Guardini (Farnese Vini) in a sprint finish to the 18th stage of the Giro d'Italia in Vedelago.
The world champion had battled his way through some tough mountain stages to the last sprint stage of the race as he aimed to strengthen his grip on the red points jersey.
And inside the final kilometre he looked to be in pole position as Geraint Thomas led him out but Guardini was tracking him just behind and surged past on the right-hand side.
The duo then powered towards the line and it was the Italian who prevailed, with Cavendish taking second and Roberto Ferrari (Androni Giocattoli-Venezuela) in third.
Cavendish, who had earlier won the day's intermediate sprint, had the consolation of extending his lead in the points classification to 29 points from Joaquim Rodríguez (Katusha), with three stages remaining in the battle for the maglia rossa.
With the field finishing together, Rodriguez remains top of the overall standings, 30 seconds in front of Ryder Hesjedal (Garmin-Barracuda) and 1:22 ahead of Ivan Basso (Liquigas-Cannondale). Team Sky duo Rigoberto Uran and Sergio Henao are fifth and 10th respectively, with Uran retaining the young rider's jersey.
The stage had seen a superb team display from Team Sky, despite the fact they were down to seven men after the withdrawals of Peter Kennaugh and Jeremy Hunt.
With the finish in Vedelago 929 metres below the start in San Vito di Cadore it was always going to be a fast stage - with an average speed of over 49km/h - and a four-man break of Manuele Boaro (Saxo Bank), Stef Clement (Rabobank), Pierpaolo De Negri (Farnese Vini) and Angelo Pagani (Colnago-CSF) got away early but were never allowed to open up a lead much over three minutes.
That was closed down in eye-catching fashion by Team Sky as the intermediate sprint point approached after 84km at Cesiomaggiore, reeling the break in with a kilometre remaining to tee up Cavendish for the maximum eight-point haul.
A second four-man break then went clear after that point, with Clement again featuring, this time along with Mickaël Delage (FDJ-BigMat), Olivier Kaisen (Lotto-Belisol) and Martijn Keizer (Vacansoleil-DCM).
But with Team Sky's Ian Stannard almost single-handedly driving the peloton, their advantage was capped at a minute and gradually brought back as the closing stages approached.
When it was all back together Stannard and Juan Antonio Flecha continued to drill it on the front before Saxo Bank moved en masse to take over the pacesetting in the closing 3km.
Bernhard Eisel put in another big kick after the flamme rouge before Thomas took over to launch Cavendish for the final sprint.
Afterwards Eisel said: "It was a long straight finish so people from behind always have a nice slipstream and that's what happened, Guardini did a good sprint.
"But it's been a good three weeks for far for us; we've won three stages and I'm pretty sure we'll take the white jersey. Cav and I will make it to Milan and we'll see what happens with the red jersey.
"We've just had some nasty crashes to rest us but I think we're all pretty happy with how it's gone."
A very different test awaits over the next two days with an epic double-header back in the mountains to sort out the general classification, starting with Friday's 198km trek from Treviso to Alpe di Pampeago/Val du Fiemme.
Stage 18 (San Vito di Cadore - Vedelago 139km):
1 Andrea Guardini (Ita) Farnese Vini - Selle Italia 3h 00m 52s
2 Mark Cavendish (Gbr) Sky Procycling at same time
3 Roberto Ferrari (Ita) Androni Giocattoli at same time
4 Robert Hunter (Rsa) Garmin - Barracuda at same time
5 Lucas Sebastian Haedo (Arg) Team Saxo Bank at same time
6 Giacomo Nizzolo (Ita) RadioShack-Nissan at same time
7 Alexander Kristoff (Nor) Katusha Team at same time
8 Francesco Chicchi (Ita) Omega Pharma-Quickstep at same time
9 Geoffrey Soupe (Fra) FDJ-Big Mat at same time
10 Dennis Vanendert (Bel) Lotto Belisol Team at same time
11 Fabio Sabatini (Ita) Liquigas-Cannondale at same time
12 Danilo Wyss (Swi) BMC Racing Team at same time
13 Fumiyuki Beppu (Jpn) Orica GreenEdge Cycling Team at same time
14 Jens Keukeleire (Bel) Orica GreenEdge Cycling Team at same time
15 Ben Gastauer (Lux) AG2R La Mondiale at same time
31 Geraint Thomas (Gbr) Sky Procycling 3h 00m 52s
161 Ian Stannard (Gbr) Sky Procycling at 2m 25s
General Classification after Stage 18:
1 Joaquim Rodriguez Oliver (Spa) Katusha Team 77hrs 47mins 38secs
2 Ryder Hesjedal (Can) Garmin - Barracuda at 0.30secs
3 Ivan Basso (Ita) Liquigas-Cannondale at 1.22
4 Michele Scarponi (Ita) Lampre - ISD at 1.36
5 Rigoberto Uran Uran (Col) Sky Procycling at 2.56
6 Benat Intxausti Elorriaga (Spa) Movistar Team at 3.04
7 Domenico Pozzovivo (Ita) Colnago - CSF Inox at 3.19
8 Paolo Tiralongo (Ita) Astana Pro Team at 4.13
9 Thomas De Gendt (Bel) Vacansoleil-DCM Pro Cycling Team at 4.38
10 Sergio Luis Henao Montoya (Col) Sky Procycling at 4.42
11 Johann Tschopp (Swi) BMC Racing Team at 4.46
12 John Gadret (Fra) AG2R La Mondiale at same time
13 Daniel Moreno Fernandez (Spa) Katusha Team at 4.55
14 Dario Cataldo (Ita) Omega Pharma-Quickstep at 4.59
15 Damiano Cunego (Ita) Lampre - ISD at 5.07
76 Geraint Thomas (Gbr) Sky Procycling 78hrs 41mins 17secs
142 Ian Stannard (Gbr) Sky Procycling at 3hrs 09mins 46secs
149 Mark Cavendish (Gbr) Sky Procycling 3.22.25