Brazil were fortunate enough to escape most of the drama, having already qualified as group winners, but they still had a say in who would join them in Russia next year.
Argentina, finalists three years ago but outside the four qualifying spots going into their match in Ecuador, fell behind in the first minute but a Lionel Messi hat-trick guaranteed his side one of the three automatic berths still up for grabs.
"Luckily, we reacted quickly after Ecuador scored," Messi said after the celebrations in Quito had died down following Argentina's 3-1 win. "Thank God, we fulfilled our objective."
Uruguay also went behind at home to Bolivia, to an own goal from Gaston Silva after 24 minutes, but they forged ahead with two goals in each half to finish second in the 10-team group behind five-time World Cup winners Brazil.
Martin Caceres, Edinson Cavani and two Luis Suarez strikes gave the home side a commanding lead before Diego Godin's own goal completed the scoring in a 4-2 win for the hosts.
A second-half goal from Paolo Guerrero kept Peru in with a chance of a first World Cup appearance since 1982 when his brilliant free kick in Lima cancelled out Colombia's opener from James Rodriguez.
Peru, unbeaten in their last six qualifiers under Argentina manager Ricardo Gareca, failed to secure the win that would have ensured automatic qualification but have the consolation of a home-and-away playoff against Oceania champions New Zealand.
"To be in this position was one of our targets for the qualifiers," Gareca said after the 1-1 draw. "There's 180 minutes left. We know that it is difficult but we know that it is up to us."
Three second-half goals, one from Paulinho and two from Gabriel Jesus, enabled the group leaders to extend their unbeaten run in the group to 17 games.
"We finished in top spot with a great win against a strong team," Jesus said. "We were focused."
Also read: Ronaldo scores first Juventus goals