Argentina drew 0-0 at home with Brazil in a tense and end-to-end game on Tuesday, but results elsewhere meant the point they earned was enough to secure them a place in next year's World Cup in Qatar.
Brazil, who guaranteed their spot last week, top the 10-team South American qualifying section with 35 points and Argentina have 29, six clear of third-placed Ecuador.
The top four teams qualify automatically, and the fifth-placed side go into an inter-regional playoff.
- Vickery: Argentina looking confident with WC spot secured
- Europe: How every country qualified for the World Cup
- World Cup 2022 qualifying: How it works around the world
Even the Argentine players did not know they had qualified until well after the match in San Juan. It was only after Ecuador, Peru and Bolivia recorded wins later in the evening that the Argentines were mathematically assured of their place in Qatar.
The good news came after an entertaining and hard fought game in western Argentina.
Neither side was able to impose themselves in an even game with Fred's second-half shot for Brazil that clipped the top of the bar the closest either team came to breaking the deadlock.
Brazil coach Tite felt Argentine defender Nicolas Otamendi should have been punished for elbowing winger Raphinha in the first half.
The two tussled for the ball near the goal line and Otamendi appeared to elbow the Leeds United winger in the face. Raphinha fell to the ground but Otamendi hauled him up, clearly wanting the game to continue.
Uruguayan referee Andres Cunha looked to be receiving messages from his colleagues in the VAR cabin but took no action, a decision that infuriated the normally placid Brazilian coach.
"Cunha is an extraordinary referee," Tite said, his voice rising. "Refereeing demands a team and those who were in the VAR, it's impossible, and I am going to repeat this, it is impossible not to see Otamendi's elbow on Raphinha.
"A high quality VAR official cannot work this way. It's inconceivable. Inconceivable is not the word I want to use. I am using that word because I am polite."
The goalless draw means Argentina are now 27 matches unbeaten, a run stretching back more than two years.
The last time Brazil and Argentina played a match, the action lasted just five minutes. The game in Sao Paulo was cut short by officials who invaded the pitch and stopped the game, accusing the Argentine players of not following the proper COVID-19 quarantine rules.
The match this time was hotly anticipated and while it lacked goals, it did not lack action.
Alongside Vinicius Jr and Raphinha up front, Brazil started with Matheus Cunha in place of Neymar, who did not travel to Argentina amid concerns about a thigh injury.
Vinicius Jr only had the goalkeeper to beat after 17 minutes but his attempted chip went wide and Cunha's ambitious lob from his own half flew over just moments later.
At the other end, Alisson got down to save well from Rodrigo De Paul five minutes before half-time.
The game opened up even further in the second half with Fred and Vinicius Jr coming close for Brazil.
But the game was still there for the taking and inevitably Lionel Messi was involved before the 90 minutes were up.
Messi was back to full fitness to start his first game since October but the Paris Saint-Germain striker was quiet until the final seconds of the match when he forced Alisson to get down to save a rasping shot from 20 meters.
"I gave it all I could," Messi said. "This was a very intense game ... It's been a while since I've been out [injured] and it's not easy to play in a game that demands this kind of pace.
"We knew it was going to be like this, a match that was tough and hard to perform in."