Ruaridh Jackson's last-minute penalty saw Scotland back up victory over world champions South Africa with a narrow 19-16 success over Samoa in the third EMC Autumn Test in Aberdeen.
Nikki Walker scored Scotland's first try of the autumn series, while Dan Parks kicked 11 points before replacement fly-half Jackson slotted the winning points with the last kick of the game.
Kahn Fotuali'i scored a try for Samoa and Paul Williams kicked a conversion and three penalties but Scotland, who defeated the Springboks 21-17 last week at Murrayfield, secured a fifth win in six Tests.
Scotland, reverting to the white change strip they wore in the humbling by the All Blacks a fortnight ago, immediately began by applying forward pressure on the Samoa line and Parks' early penalty gave the hosts a 3-0 lead.
But Samoa went in front after nine minutes, breaching the Scotland defence with a move which demonstrated their full range of talents. George Pisi broke down the left and kicked on, Seilala Mapusua picked up and fed inside to scrum-half Fotuali'i to score. Williams converted.
But Scotland battled back with a converted try of their own. After a scrum on the right, Walker burst through on an angled run off his right wing and touched down under the posts.
Parks, who had a 100% success rate against South Africa, missed a penalty before being granted another opportunity after Ross Ford had initiated a driving maul.
Williams cut the interval deficit to three points with a penalty after Kelly Brown was penalised for not rolling away from a tackle on Alesana Tuilagi and the full-back levelled two minutes into the second half.
The hosts then spread the ball the width of the field trying to puncture a hole in the Samoa defence, but no break was forthcoming and Parks dropped a goal to make amends for his missed penalty and keep the scoreboard ticking over.
The hosts creeped offside and Samoa drew level again with Williams kicking a penalty from in front of the posts but Samoa replacement Iosefa Tekori was penalised at the breakdown in the last minute, handing Scotland an opportunity to steal victory. And Glasgow Warriors number 10 Jackson stepped up to convert the resulting penalty with his first points in international rugby.