Wales restored some faith in their World Cup ambitions after holding on for a vital victory over Argentina by 27-20 at the Millennium Stadium.
Wales raced into a 24-7 lead at half-time with tries from captain Gareth Thomas, Alun-Wyn Jones and Mark Jones before the Pumas hit back.
Winger Ignacio Corleto, who had opened the scoring for Argentina with an intercept try inside four minutes, added a second and Federicho Todeschini's boot dragged the Pumas to within a converted try.
Wales were forced into some desperate defence in the closing minutes and Thomas wheeled away in despair when Martin Durand ploughed over the line with time up.
But the television replay showed the Argentina forward had spilled the ball forward as he tried to ground it and Wales had survived to land a morale-boosting victory.
Early in the match Thomas' pass was picked off by Corleto, who sprinted 60 metres to put Argentina ahead inside just four minutes.
James Hook sliced through the midfield and then presented Thomas with the chance to make swift amends. The Wales captain scored gratefully under the posts and Hook's conversion drew Wales level.
Wales continued to be haunted by troubles in the lineout but were strong in defence and succeeded in forcing Argentina into mistakes.
Thomas' jinking run cut deep into Argentina's 22, Peel took a quick tap penalty from under the posts and Alun-Wyn Jones powered over for his first Test try.
Wales scored again three minutes later when Argentina's full-back Federico Serra slipped as he took a pass on half-way and Hook hacked the loose-ball forward to turn Argentina on their heels.
Shanklin took up the chase, twice got his boot to ball and despite Corleto's best efforts Mark Jones was on hand to touch down for a try confirmed by video official Romaine Poite.
Hook slotted a simple penalty to extend Wales' advantage - but the Pumas emerged after half-time reorganised and with greater purpose.
Todeschini and Hook exchanged penalties before Argentina served notice that they are no longer the grunt merchants of old with a dazzling try.
Borges, back involved after his time in the bin, cut past two defenders on a brilliant run before slipping the scoring pass to Corleto on his right shoulder.
Martyn Williams stripped the ball from Pichot and Shanklin broke around the fringes of the ruck and into clear ground - only to be called back for obstruction.
Todeschini slotted a second penalty to bring Argentina within a converted try.
With less than three minutes remaining the Pumas forced Wales back on to their own line as Todeschini fired a brilliant penalty into touch just five metres out.
Hooker Matthew Rees was sin-binned for deliberate off-side as Wales threw bodies in the way in a desperate attempt to keep Argentina out.
At the third time of asking, the Pumas drove Durand over the line but the television official spotted the ball was spilled forward and Wales had their victory.