Peter Sagan snatched overall victory on the line while Marcel Kittel claimed his fourth stage win on a frantic final day in Kraków at the Tour of Poland.
Kittel (Skil-Shimano) proved strongest once again in the sprint but as the German celebrated victory, so did the second placed man across the line.
Sagan produced a powerful sprint to net a precious six bonus seconds which proved to be enough to move the Liquigas rider into a race-winning position.
That meant heartbreak for overnight leader Dan Martin (Garmin-Cervelo) who lost the race in the final metres, winding up five seconds behind the talented Slovakian after the dust had settled on an action-packed stage.
Martin's team-mate Heinrich Haussler could only manage fourth in the concluding sprint after playing a key role in the day’s proceedings at the crucial intermediate sprint point.
Britain’s Peter Kennaugh (Team Sky) finished safely in the main bunch to secure fifth place overall after a strong performance throughout the race, while team-mate Steve Cummings earned a welcome ninth spot on his return from injury.
The day began with the race delicately poised with just three seconds separating leader Martin and the chasing Sagan and Marco Marcato (Vacansoleil), marking the second year in a row Martin was pressed into defending a slender lead on a tricky final stage
Unsurprisingly the intermediate sprint would become vital with bonus time up for grabs and, in scenes that mirrored the finish to a race, three teams went head to head with Haussler narrowly edging out Sagan to take the sprint.
The Australian held his line around a tight right hander squeezing Sagan towards the barriers and, in doing so, ensured the Slovakian only gained two seconds, leaving the youngster a single tantalising second off the lead.
Marcato mopped up third place and a one-second bonus to move within two seconds of the lead to bring to an end the first phase of the day’s action.
A brief lull in the bunch allowed a break to pull clear with Tomasz Marczynski (CCC Polsat) on the attack in partnership with Nelson Oliveira (RadioShack) in a move that quickly opened out an advantage of over a minute.
The pair profited from uncertainty in the bunch to gain a healthy advantage but a 1:01 lead at the bell quickly crumbled under pressure from a marauding peloton with Team Sky to the fore.
The day began in a calmer fashion as Jacek Morajko (CCC Polsat) hit out on his own in the early stages; Alexandre Pliuschin (Katusha) eventually jumping out of the bunch with just under 70km to go to bridge across to the grateful Pole.
Despite the duo linking up the move was never likely to gain much ground with Liquigas arriving en masse at the front of the bunch to control the situation.
Reinforcements arrived in the form of Daniele Righi (Lampre) and Luca Paolini (Katusha) while Polish national champion Marczynski followed to take the place of team-mate Morajko who was swept back up.
That set the scene for the vital intermediate sprint and a tense run for home that saw Sagan again demonstrate why he is labelled one of the top talents in world cycling.