Pretoria - Alasdair Strokosch scored a try after the siren and Greig Laidlaw converted to give Scotland a 30-29 win over Italy on Saturday in a four-nation tournament third-place play-off.
The dramatic climax atoned for a lot of scrappy play at sun-drenched Loftus Versfeld between a couple of weary Six Nations championship sides at the end of an 11-month season.
Scotland camped deep in Italian territory as the clock ticked away and after a 17-phase movement failed to reap any reward, flanker Strokosch broke from a scrum and punished slack marking to go over beside the posts.
Captain and scrumhalf Laidlaw converted for a 15-point contribution and his play at scrum-half, and later fly-half, earned him the official man-of-the-match award.
Match starts do not get much better than scoring a try after 52 seconds, and that is what Italy did with debutant right wing Leonardo Sarto going over and fly-half Alberto Di Bernardo converting.
Scotland were level after seven minutes through a try by centre Matt Scott after a break by loose forward David Denton, but some woeful attempts at tackling contributed to the score which Laidlaw converted.
Di Bernardo, who made his Test debut two weeks ago against South Africa at the age of 32, nudged the Azzurri (Blues) ahead again with a penalty after a Scottish side struggling at the scrums were blown up.
But it took Scotland just two minutes to take the lead for the first time when left-wing Giovanbattista Venditti was dispossessed close to his line and Laidlaw sent left-wing Sean Lamont over for a try and added the conversion.
Laidlaw kicked a penalty and his team had a seven-point advantage midway through the opening half in clear, warm conditions despite coming off second best in the possession and territory battles.
Italy scrummed superbly throughout the three-week tournament and their supremacy in this facet led to a penalty try that Di Bernardo converted after Scotland repeatedly collapsed the set piece.
Laidlaw and Di Bernardo kept perfect goal-kicking records intact with a penalty each before half-time to leave the teams level at 20-20 - a score that pleased Scotland more as they made few incursions into opposition turf.
The battle of the boots continued after the break with Laidlaw landing one before Di Bernardo succeeded twice to give Italy a 26-23 advantage as an untidy match reached the hour mark.
After a bright start to the half by Scotland, Italy regained the ascendancy and had a chance to double their lead only for a Di Bernardo to drift a penalty left for his only miss of the match.
When Di Bernardo was given another chance from an almost identical position, he atoned with a kick between the posts and a six-point lead as the game entered the closing stages.
A rare Scottish visit inside the Italian 22-metre line ended with Laidlaw knocking on when he tried to dive over a pile of bodies and Italy cleared the danger off the resulting scrum.
Tries: Matt Scott, Sean Lamont, Alasdair Strockosh
Conversions: Greig Laidlaw (3)
Penalties: Laidlaw (3)
Tries: Leonardo Sarto, Penalty Try
Conversions: Alberto di Bernardo (2)
Penalties: Di Bernardo (5)