That meant Peru fell from fifth to sixth, and Colombia from fourth to fifth.
But the changes kept coming across the second half. Chile dropped to fifth after conceding against Brazil. Peru briefly occupied the spot for a few minutes, before they conceded against Colombia which sent Chile back up to fifth. But Peru equalized in the 74th minute which proved pivotal, and they hung on to advance on goal difference.
The crucial game in Quito between Ecuador and Argentina had a dramatic start, when Ecuador scored after just 39 seconds.
However Argentina quickly recovered, with Messi equalizing in the 11th minute, after a combination with Angel Di Maria.
The Barcelona star then lashed home from 10 yards six minutes later to calm Argentinean nerves and Messi wrapped up his hat trick in the second half to seal their place in Russia.
Meanwhile Chile crashed to a 3-0 defeat to end their hopes, which allowed Peru to advance ahead of their Andean neighbours on goal difference.
Fulltime scores
Ecuador 1 Argentina 3
Uruguay 4 Bolivia 2
Brazil 3 Chile 0
Peru 1 Colombia 1
Paraguay 1 Venezuela 1
How the opponent was found:
12:30pm The five matches kick off across South America. Peru sits in fifth position.
12:50pm Lionel Messi's second goal takes Argentina into the lead against Ecuador. Colombia move into fifth.
1:41pm. Brazil takes the lead against Chile. Chile move into fifth.
1.46pm. Brazil extends their lead. Peru move into fifth on goal difference.
1.47pm. Colombia takes the lead against Peru. Chile go back into fifth.
2.08pm Peru equalize against Colombia. Peru move back up to fifth.