Wales were forced to settle for a draw against 14-man Argentina on Saturday after a tense encounter in Cardiff finished 20-20.
Pumas full-back Juan Cruz Mallia was sent off for a dangerous high challenge on Wales scrum-half Kieran Hardy just before the half-hour at the Principality Stadium.
But Argentina led until eight minutes from time before they were undone by substitute scrum-half Tomos Williams's try that his fellow replacement Jarrod Evans converted.
Evans missed a long-range penalty to win it for the Welsh in the closing seconds.
Wales, missing 10 players on British and Irish Lions duty in South Africa, produced a battling display against a team that beat New Zealand and drew twice with Australia last year.
But there will also be a sense of frustration that they could not capitalise on Argentina's indiscipline ahead of another meeting again in Cardiff next Saturday.
The game had been due to take place in South America, but the coronavirus pandemic meant it was switched to Wales, with Argentina as the home side.
Nicolas Sanchez opened the scoring with a penalty for Argentina before Callum Sheedy found the target with a penalty from close range to level things up.
Wales suffered a blow when Aaron Wainwright's afternoon ended early in the second quarter.
The Dragons forward departed injured, replaced by Josh Turnbull, but Wales continued to show plenty of attacking verve before Sheedy kicked a second successful penalty.
The Pumas had plenty of possession but suffered an injury setback when wing Santiago Carreras was forced off.
Referee Matthew Carley then lost his patience following the latest in a series of collapsed scrums, sin-binning Wales prop Dillon Lewis and the tighthead's opposite number, Nahuel Tetaz Chaparro.
- Red card -
Matters then deteriorated for Argentina, who were briefly reduced to 13 men when Cruz Mallia was dismissed for his challenge on Hardy, handing Wales a significant advantage.
But Wales could not make it count as Sanchez hauled Argentina level with his second penalty five minutes before half-time and Pablo Matera's converted try gave them a 13-6 interval lead.
Jeronimo de la Fuente finished off a slick move early the second half, with Sanchez converting, and Wales head coach Wayne Pivac began making changes.
Will Rowlands crashed over for his second try in successive Tests, and Evans's conversion narrowed the gap to seven points.
Sanchez then missed two penalties in quick succession, and the game remained finely balanced entering its final quarter.
Williams then pounced from close range, with Evans converting his half-back partner's try to set up a grandstand finish, before Evans sent a last-gasp penalty wide.
"We have to be more disciplined, look after the ball better than we did," Pivac told S4C's Clwb Rygbi.
"We weren't clinical enough in attack. It was a step up from last week. Both teams were unhappy with a draw, so we'll both want to improve next week."
But he added, on an upbeat note: "Some of the boys have taken to international rugby like a duck to water. That's going to give us depth."