Edinburgh winger Emiliano Boffelli crossed after the 80-minute mark to deny Scotland a tour series victory in Argentina.
Scotland were 15 points ahead with half an hour left following try doubles from Duhan van der Merwe and Ewan Ashman but the hosts fought back to seal a 34-31 victory in front of 30,000 fans in Santiago del Estero.
The pulsating decider ended in dramatic fashion when Argentina worked the ball out wide for Boffelli – who finished with 17 points – to go over following some sustained late pressure.
The winger had squandered a good chance for an early try when he mishandled on the touchline but the Edinburgh man soon kicked a penalty to open the scoring.
Scotland had made eight changes following their second-Test victory with full-back Ollie Smith making his debut, and they finally came to life in the 13th minute.
Blair Kinghorn squeezed through two opponents and offloaded to Van der Merwe to power over the line.
Boffelli was soon involved as Argentina responded. The 27-year-old set up Santiago Carreras to go over and then kicked the hosts 10-7 in front.
The action continued as Ashman powered over after a line-out maul and Kinghorn added his second conversion.
Boffelli reduced the arrears with a penalty and Kinghorn hit the bar with a long-range penalty attempt in the final minute of the half.
Scotland took control in the opening 10 minutes of the second period.
Ali Price fed Kinghorn, whose quick pass allowed Ashman to cross out wide.
Van der Merwe then cut inside to follow up some good ball-carrying from his forwards to go over again. Kinghorn’s kicking put Scotland seemingly well in command, but the hosts hit back inside three minutes.
A needless penalty allowed Argentina to put the Scots under pressure and Tetaz Chaparro went over after the five-metre scrum.
Scotland’s pack helped them settle and Kinghorn kicked the visitors 11 points in front with 15 minutes left.
Argentina refused to buckle and Gonzalo Bertranou scored from close range in the 67th minute.
With Scotland four points in front, they passed up the chance to kick a penalty and Jonny Gray was held up as he forced his way over the line following the lineout.
Dave Cherry put in some big hits and Price produced a try-saving tackle as Scotland tried to withstand the pressure, but Boffelli had the final say when he dived over and then added a final flourish by kicking from the touchline.