A late try from Joe Ansbro gave Scotland a win in their World Cup warm-up game with Ireland at Murrayfield.
With just two minutes remaining, the centre found himself on the wing and raced on to score from Nick De Luca's fine pass.
Jonathan Sexton kicked two penalties for the visitors, with Chris Paterson replying once for the Scots.
Ireland defended stoutly in a stodgy game and the Scots lacked invention until the dramatic finale.
Completely out of the blue, De Luca jinked forward from a Jackson pass and smartly released Ansbro, who cut in from the flank to touch down in style to seal the encounter.
The visitors made 13 changes to the side that finished the Six Nations with a stirring victory over England, while Scotland head coach Andy Robinson tinkered less, making five alterations to the starting XV that beat Italy in March.
With both sides running through training ground moves, the ball was in hand for long spells and it was Scotland who enjoyed the bulk of possession.
Nikki Walker had the home crowd on their feet after a fourth-minute line-break but a promising phase broke down under the posts due to an overly-ambitious pass from Ruaridh Jackson.
Graeme Morrison was next to have a go but he was held up by some rock solid defence from the Irish.
Quick hands from Jackson and Paterson then set up Walker in the corner but Rob Kearney did enough to force a fumble from the winger just a metre or so from the line.
With 20 minutes gone, Walker had to leave the field with a head injury and Jack Cuthbert came off the bench for his first Scotland cap.
Ireland offered little as an attacking force but took the lead with a simple penalty from Sexton on 33 minutes after infringements from Jim Hamilton and Ross Rennie.
Scotland responded with a period of concerted pressure before the interval but, again, the final pass eluded them.
Johnnie Beattie snaffled a kick from Luke Fitzgerald near the halfway line early in the second half to bustle forward with menace. However, a knock-on from Alasdair Strokosch was to be Scotland's undoing this time.
Paterson, with his sights on a fourth World Cup, levelled the game on 49 minutes with a straightforward penalty kick.
Both sides made a huge number of changes midway through the second period but the untidy nature of play continued in a game littered with mistakes.
Sexton nudged Ireland ahead again with a cracking penalty from distance and Paterson squandered the chance to reply immediately with a rare miss.
Leinester fly-half Sexton then came up just short as he attempted another long-range penalty for the visitors, before Ansbro's try lit up the finale.
Scotland: Paterson, Walker, Ansbro, Morrison, S. Lamont, Jackson, R. Lawson, Jacobsen, Ford, Cross, Hamilton, Gray, Strokosch, Rennie, Beattie.Replacements: De Luca for Paterson (70), Cuthbert for Walker (22), Laidlaw for R. Lawson (70), Dickinson for Jacobsen (57), Hall for Ford (70), Kellock for Hamilton (57), Denton for Beattie (57).
Ireland: Kearney, Trimble, McFadden, P. Wallace, Fitzgerald, Sexton, O'Leary, Court, Cronin, Buckley, Ryan, Cullen, McCarthy, Ronan, Leamy. Replacements: Jones for Fitzgerald (61), Boss for O'Leary (61), Hayes for Court (61), Flannery for Cronin (61), Horan for Buckley (61), McLaughlin for Ryan (51), M. O'Driscoll for Cullen (61).
Ref: Wayne Barnes (RFU).