Lionel Messi scored a superb hat-trick as Argentina came from behind to win away in Ecuador and qualify for the 2018 World Cup in Russia.
Brazil had already qualified and Luis Suarez scored twice as Uruguay beat Bolivia 4-2 to qualify, with Colombia also advancing with a 1-1 draw in Peru.
Peru finished fifth in South American qualifying and will now meet New Zealand in a two-legged play-off.
But Alexis Sanchez and Chile are out after losing 3-0 away in Brazil.
Argentina began the day in sixth position and in danger of not qualifying for a World Cup for the first time since 1970.
They made a terrible start in the high-altitude location of Quito and the hosts went ahead after 38 seconds through Romario Ibarra’s goal – the quickest goal Argentina had ever conceded in a World Cup qualifier.
However, Argentina, World Cup runners-up in Brazil in 2014, fought back with Messi in stunning form.
The five-time world player of the year equalised after 12 minutes when he linked up with ex-Manchester United midfielder Angel di Maria and stabbed home.
His second goal came eight minutes later with a powerful strike from the edge of the area before a fine solo goal in the second half sealed the victory.
Disaster for Chile
Chile, who have won the Copa America in its last two tournaments, were aiming to qualify for their third successive World Cup after reaching the last 16 in 2010 and 2014.
They began the final round of matches in third place, but fell behind to two Brazil goals in three second-half minutes from Paulinho and Gabriel Jesus.
With Peru scoring a late equaliser against Colombia, Chile needed to score to be in the play-offs. In injury-time, Chile attacked with all of their players, including goalkeeper Claudio Bravo, in the Brazil half.
However, the attack broke down, Brazil launched the ball forward and Jesus walked the ball into the net for his second with Manchester City team-mate Bravo stranded to confirm Chile’s elimination.