The ghosts of Samoa almost returned to haunt nervy Wales who came within inches of another embarrassing defeat in Cardiff to the South Sea islanders.
Twice Wales looked set to break clear but failed to take their chances and were pegged back by the gutsy Samoans eager to write their name in the history books yet again.
Seilala Mapusua scored an interception try to set up a nerve-jangling last 20 minutes here. Had his kick not rolled agonisingly out of play with Uale Mai hovering to score, they very well might have delivered the most significant defeat in Warren Gatland's two-year tenure as Wales coach.
Gavin Williams also missed a penalty in front of the posts and Henry Tuilagi was stopped yards short as Samoa finished with a flurry as another special victory was within their grasp.
In the end Wales held on, but only just, as two youngsters ensured history did not repeat itself. Leigh Halfpenny's early try and the coolness of 19-year-old fly-half Dan Biggar's boot ultimately proved the difference but the leadership of Ryan Jones was just as important as Samoa bullied their hosts for much of the second half.
Jones said: "It was about as tough as it gets in Test match rugby. The Samoans gave everything and really hit hard. But our boys dug deep for the victory that we wanted and needed. There is a courage, strong work-rate and work ethic with my guys and it was great we kept them out in the last five or six minutes.
"We need to look at cutting out the mistakes. We have been offering so much, but not quite delivering – we haven't had that clinical edge in our game. It has been a case of the last pass or the last phase letting us down."
There were worrying signs for Wales throughout this game and not for the first time against opponents whose name still sends a shudder down the spine of even the hardiest Welshman following the World Cup giant-killing acts of 1991 and 1999.
Of all the days to face their World Cup nemesis, Friday the 13th would have been the last date Wales would have been the last they wanted. Those woes of the past paled into insignificancy compared to those suffered by Samoa in recent months following the tsunami tragedy two months ago that killed more than 200 people in Samoa, including friends and family of this squad.
Such is Samoan rugby, with players dispersed around the world, they had just four days to prepare for this Test, naming seven British-based players including captain George Stowers and relying instead on passion and raw rugby ability.
Stowers said: "We can be so proud of ourselves for pushing a top tier nation close. It was a case of so near but after only a few days together, we showed again why we deserve to have more games against the big teams."
There were, of course with Samoa, huge hits that jarred bones and shuddered around the Millennium Stadium. A late shoulder barge on Dwayne Peel left the scrum-half sprawled and saw Bigger kick the opening points.
Inevitably Wales were the more match-ready after 80 minutes against the All Blacks last Saturday and that sharpness told in the opening minutes when Biggar's cross-field kick created the opening try. Halfpenny never took his eye off the ball as it floated enticingly over the head of David Lemi and the Wales wing collected and dived over for his fifth try in only eight Tests. Biggar missed the conversion but added a penalty after 17 minutes as Wales looked to break lose, armed with an early 11-3 lead and dominating the set-pieces as well.
Fa'atonu Fili and Halfpenny exchanged penalties either side of half time and Biggar added another after Henry Tuilagi was sent to the sin-bin on 51 minutes. But as Wales pressed, Mapusua picked off Biggar's pass to set up a dramatic climax.
Wales: Tries L Halfpenny Penalties D Biggar (3), L Halfpenny. Samoa: Try S Mapasua Conversion F Fili Penalties F Fili (2).
Wales J Hook; L Halfpenny, T Shanklin (J Davies, 49), J Roberts, T James; D Biggar, D Peel; G Jenkins, H Bennett (M Rees 63), P James (C Mitchell, 63), AW Jones, L Charteris (B Davies, 73), A Powell, R Jones (capt), S Warburton (J Thomas, 73).
Samoa L Lui; D Lemi, G Williams, S Mapusua, A Tuilagi; F Fili (U Mai, 64); J Poluleuligaga; H Tuilagi (H Fa'afili, 56); J Va'a, M Schwalger, C Johnson, F Levi, I Tekori (K Thompson, 58), G Stowers (capt), H Tuilagi, O Treviranis (J Fa'Amatuanu, 64).
Referee: P Fitzgibbon (Ireland).