Lionel Messi’s heroic hat-trick dragged Argentina back from the brink of an embarrassing World Cup exit with a 3-1 win in Ecuador.
Argentina's victory catapulted them from sixth into the automatic qualification places as they joined Brazil, Uruguay and Colombia in booking their spots in Russia.
After the shock of falling behind after 38 seconds to Renato Ibarra, Messi shouldered the hopes of an entire nation and put in one of the greatest individual performances in international football history by scoring a famous treble (12, 20, 62) when it mattered most.
The four-time Ballon d'Or winner now has another crack at adding a World Cup winners medal to his CV.
Elsewhere, Peru's draw against Colombia was enough to secure them a play-off with New Zealand for the final spot, which meant Chile were eliminated after they lost 3-0 in Brazil.
Argentina, who have been at every World Cup finals since 1970 and twice won the tournament, knew anything other than victory would have meant elimination.
It seemed inconceivable that one of football's superpowers would not make it to the World Cup - but that looked a serious possibility when Ecuador took a shock lead inside 40 seconds.
Romario Ibarra ploughed his way through a nervy Argentina back-line and reversed a fine finish beyond Manchester United goalkeeper Sergio Romero.
Argentina, who had not scored in open play for 450 minutes, needed inspiration and it came from a familiar source.
Messi and Angel di Maria teamed up to devastating effect. Messi played a clever one-two with the winger before sweeping home from close range with 12 minutes on the clock.
His influence on the game was growing by the minute and soon he'd single-handedly dragged his country back into World Cup contention with another sublime finish. Ecuador squandered possession, which gave Messi the invitation to pounce. He drove into the area and fired into the roof of the net in the 20th minute, making a tricky finish look devilishly easy.
Ecuador pinned Argentina back after the break and looked the more likely to strike - until Messi waved his magic wand again on 62 minutes.
Picking the ball up about 35 yards out, he had options either side but decided to go it alone. He had a lot to do with the finish from 15 yards due to being off balance but he managed to loft a wonderful effort over the goalkeeper.
It was a goal, and performance, that defied logic and defined world-class.
Man of the match - Lionel Messi
One of the easier man of the match decisions. After failing to score a single away goal in the qualifying campaign, Argentina's little maestro turned it on when it mattered most with three classic finishes.
Words really don't do his performance justice. It was legendary. Without him, Argentina would be spending the summer at home.
10 out of 10 - no argument.