Scotland needed a late try from replacement Rob Harley to claim a dramatic 17-16 win over Samoa at Apia Park on Saturday.
Victory for the visitors means that Andy Robinson's side finish their tour of the southern hemisphere unbeaten following previous wins over Australia and Fiji.
Centre Joe Ansbro made the most of his late addition to the starting line-up after Nick De Luca failed a fitness test on a thigh strain, crossing over for a try late to give his side a 7-6 lead at the break.
However, Samoa seemed headed for their first-ever win over Scotland when fly-half Tusi Pisi, who provided all of his team's points, started to take control of the game to give his side a 16-10 lead.
The pivot followed up two penalties in the opening 40 minutes with a drop-goal, a conversion and a try. Wing Paul Williams found a gap between lock Richie Gray and left wing Tim Visser on the blind side of a ruck and put Pisi through for the five-pointer.
Scotland provided unrelenting pressure in the closing quarter, but they were nearly caught out when Samoa wing Paul Perez picked up a loose ball to cross over. However, the try was not awarded as the touch judge found that a foot went into touch in the build-up.
The pressure from the visitors finally told on the Samoan defence as Mike Blair sent Harley, who was making his debut, through a huge gap by the left-hand post late in the game.
Greig Laidlaw slotted the simple conversion to secure an historic win.
Tries: Ansbro, Harley
Cons: Laidlaw 2
Samoa: 15 Fa'atoina Autagavai, 14 Paul Perez, 13 Fautua Otto, 12 Paul Williams, 11 David Lemi (c), 10 Tusi Pisi, 9 Kahn Fotuali'i, 8 Kane Thompson, 7 Maurie Fa'asavalu, 6 Ben Masoe, 5 Daniel Crichton, 4 Fa'atiga Lemalu, 3 Census Johnston, 2 Ti'i Paulo, 1 Sakaria Taulafo.
Replacements: 16 Wayne Ole Avei, 17 Logovi'i Mulipola, 18 Joe Tekori, 19 Afa Aioni, 20 Jeremy Sua, 21 Ki Anufe, 22 Lolo Lui.
Scotland: 15 Stuart Hogg, 14 Sean Lamont, 13 Joe Ansbro, 12 Matt Scott, 11 Tim Visser, 10 Greig Laidlaw, 9 Chris Cusiter, 8 Richie Vernon, 7 Ross Rennie, 6 Alasdair Strokosch, 5 Alastair Kellock, 4 Richie Gray, 3 Euan Murray, 2 Ross Ford, 1 Ryan Grant.
Replacements 16 Scott Lawson, 17 Geoff Cross, 18 Tom Ryder, 19 Robert Harley, 20 Mike Blair, 21 Duncan Weir, 22 Max Evans.
Referee: Chris Pollock (New Zealand)
Assistant referees: Ian Smith, Andrew Lees (both Australia)