The stage was set for one of the more dramatic World Cup qualifying nights in recent memory, and it delivered.

Lionel Messi was heroic for Argentina, netting a hat trick to bring his nation back from a deficit in the first minute in Ecuador and send the Albiceleste to Russia after a harrowing qualifying campaign.

Elsewhere, Chile, the two-time reigning Copa America champion, failed at Brazil, falling 3-0 and tumbling out of the qualification places. Colombia and Uruguay clinches the other two automatic World Cup berths up for grabs in South America, while Peru, riding the heroics of Paolo Guerrero, are still alive and will go to an intercontinental playoff against New Zealand for a final place in Russia. Venezuela did its part in helping Peru by stunning Paraguay, which could have worked its way into the top five with a win.

Here is how the places up for grabs wound up shaking out:

NATION

RECORD (W-L-D)

GOAL DIFFERENTIAL

GOALS FOR

GOALS AGAINST

2. Uruguay

9-5-4 (31 points)

12

32

20

3. Argentina

7-4-7 (28 points)

3

19

16

4. Colombia

7-5-6 (27 points)

2

21

19

5. Peru

7-6-5 (26 points)

1

27

26

6. Chile

8-8-2 (26 points)

-1

26

27

7. Paraguay

7-8-3 (24 points)

-6

19

25

Here's how a wild night across South America played out:

GABRIEL JESUS FINISHES OFF CHILE

Gabriel Jesus scored his second of the night late to polish off Chile 3-0 and put a tremendous cap on Brazil's sensational qualifying campaign. Brazil wound up 12-1-5 in the CONMEBOL cauldron and will be one of the favorites to win it all next summer in Russia.

GUERRERO COMES TO PERU'S RESCUE

Peru's most storied veteran, Paolo Guerrero, fired his country into fifth place, scoring off a free kick in the 75th minute and bumping Chile down to sixth place in the live table.

Lionel Messi simply put Argentina on his back Tuesday night, coming up with a vital insurance goal in Quito to give Argentina a 3-1 lead. At that moment, Argentina was safe in fourth place in the table.

Uruguay scored a third straight goal after conceding early, going up 3-1 through Luis Suarez, and the Barcelona frontman added La Celeste's fourth soon after. Uruguay can make its reservations for Russia.

Brazil is already qualified, but it has no problem spoiling Chile's qualifying efforts. Paulinho touched home a rebound after Dani Alves's shot was saved, giving the Selecao a 1-0 lead in the 55th minute. Moments later, Gabriel Jesus doubled the advantage, making it 2-0.

Uruguay could have punched its ticket with a win over Venezuela in the penultimate qualifier. Instead, it left everything for the finale, and it trails at home to Bolivia, which has long been eliminated, on an own goal from Gaston Silva.

Lionel Messi won't let Argentina die. La Pulga scored his second of the opening half in the 20th minute, putting Argentina in position to qualify based on the other results. In the live standings, Argentina is now up to third.

​Who else to come to the rescue for Argentina than Lionel Messi? Angel Di Maria set up the Barcelona superstar for a massive goal in the 12th minute, which brings Argentina back to life support, but still with work to be done. With other results as they currently are (all 0-0), Argentina is still on the outside looking in.

Angel Di Maria works a combination with Messi, and Argentina’s superstar comes to the rescue. Still work to be done pic.twitter.com/NMZfpvHleq