A first international try by Jo Ansbro saw Scotland grab a late 10-6 win over Ireland in their Rugby World Cup warm-up match at Murrayfield on Saturday.
The Irish, who fielded a largely second-string side as coach Declan Kidney bids finalise his 30-man squad for the World Cup, scored their points through two penalties by Jonathan Sexton.
Ansbro's fine late individual try was converted by Ruaridh Jackson while the Scots' other points came fron a penalty by veteran Chris Paterson, who is bidding to play in his fourth World Cup.
Scotland coach Andy Robinson credited 25-year-old Ansbro's try down to his scrum.
"What a great finish. Joe took his try absolutely superbly and I think we got what we deserved," said Robinson.
"The score was all down to the speed of ball from the forwards.
"If you want to break down good defences you must have fast ball and the try underlined that.
"We had kept our shape in attack throughout the game and our scrum had been solid.
"Overall I am pretty pleased with the result and the performance at this stage in our build up to our departure for New Zealand."
Kidney, who has been rewarded with a new contract ahead of the World Cup, insisted the outcome had not been a major setback.
"Obviously we came here wanting to win and I think we were a bit unlucky not to get that result," said Kidney, who guided Ireland to the Six Nations Grand Slam in 2009.
"But I was delighted with many features of our play and many of the younger guys did what was asked of them and more."
The hosts suffered a setback midway through the first half when Nikki Walker went off with a head injury and was replaced by Bath's Jack Cuthbert, who was earning his first cap.
His entrance was the cue for Ireland to pile on the pressure and unlike their opponents they capitalised by edging in front with a simple penalty Sexton.
ohnnie Beattie set up the most potent attack by grabbing Fitzgerald's chip-ahead, howeverinstead of feeding the unmarked Ross Rennie he opted to duck infield and the move broke down.
Two minutes later the Scots did equalise via the boot of Paterson when the Irish defence sneaked offside close to their own tryline.
The Irish seized the initiative 15 minutes from time as Sexton found the target again to set up a tense finale and they looked like holding onto their advantage until Ansbro's moment of magic.
The Scots have just one more warm-up match while the Irish have four including two against the French and one against 2003 world champions England.