Emiliano Boffelli kicked 19 points to help Argentina to a dramatic 29-17 victory over Wales in Marseille on Saturday to set up a Rugby World Cup semi-final against the winners of Ireland versus New Zealand.
Los Pumas came into the quarter-final at the Stade Velodrome as underdogs, having finished Pool D runners-up to England while Wales booked their place in the quarters with a perfect four wins from four in Pool C.
But Argentina played the territorial game, and while not shining in attack, proved to be solid in defence, disruptive at the line-out and disciplined enough to contain a fancied Welsh side seeking to make the semi-final for the third time in four tournaments.
Boffelli dragged an early penalty attempt wide after some sustained Argentinian pressure as Wales responded with an expansive game.
Star winger Louis Rees-Zammit was involved in three ensuing Welsh attacks, twice unable to make anything of his chip and chases and once stepping inside into space only for his offload to go forward.
Flanker Tommy Reffell showed all the skills of an outside back to step inside the Argentine defence, but Gareth Davies spilled the pass in a high-intensity opening with both sides electing to play the ball.
For all their possession, however, Los Pumas looked lacklustre when in attack and Welsh pressure paid off after George North split the defence on an inside ball from Dan Biggar.
North, making history as the first Welsh player to compete in four World Cup quarter-finals, found Davies off the floor and the scrum-half this time made no mistake to pass on to Biggar, the fly-half crossing for a try under the posts he converted himself.
Referee Jaco Peyper pinged a hamstring and was replaced by Karl Dickson as Biggar stretched Wales' lead with a 21st-minute penalty.
Biggar went wide with a long-range penalty as Wales failed to convert pressure into points, losing three of their own line-outs in quick succession, two from choosing to kick to the corner rather than for the posts.
Argentina made no mistake on their own attacking line-out, Thomas straying offside as the ball was recycled into midfield to hand Boffelli a straightforward penalty kick.
Los Pumas had the ascendancy going into half-time, Liam Williams on hand for a try-saving tackle on Santiago Carreras as Nick Tompkins fell off a tackle.
Josh Adams was penalised for a needless hit on Tomas Cubelli to allow Boffelli bring Argentina to within four points at the break when it looked at one stage like Wales could have run away with it.
Boffelli kicked a third penalty at the start of the second period as Reffell was caught offside and then took Argentina into the lead with a fourth shortly after when Dewi Lake, on at hooker for the misfiring Ryan Elias, was penalised.
Replacement scrum-half Tomos Williams reversed the momentum, dummying from the base of a ruck and scooting in under the posts, Biggar converting to make it 17-12.
A misjudged kick from Rees-Zammit put the pressure back on Wales, Argentina opting for a series of kicks to the corner.
Prop Joel Sclavi, with his first touch of the ball, was eventually driven over for a try, Boffelli converting to edge Argentina two points ahead.
Los Pumas were then penalised at the scrum, Wales kicked deep but as they threatened Williams knocked on and the ball was cleared.
North and Rio Dyer came racing back up the pitch, Matias Moroni producing a dramatic try-saving tackle on Rees-Zammit in the corner.
Argentine fly-half Nicolas Sanchez put the icing on the cake with an interception of a Sam Costelow pass for a try, Boffelli converting.
Another veteran, hooker Agustin Creevy, then snatched a turnover at the death, Boffelli making no mistake from the kicking tee in a final penalty.