MONTEVIDEO, Uruguay (AP) — Uruguay defeated Argentina 3-2 in a fiercely competive match Tuesday and faces a two-game playoff next month against Jordan to land a spot in next year's World Cup in Brazil.

Uruguay finished fifth in the South American qualifying group with Argentina, Colombia, Chile and Ecuador earning the automatic berths.

Edinson Cavani scored the winner for Uruguay in the 50th, following two first-half goals by Argentina's Maxi Rodriguez and one each from Cristian Rodriguez and Luis Suarez, who scored from a penalty.

Argentina played without many of its top players including Lionel Messi.

Uruguay and Ecuador finished with 25 points, but Ecuador claimed fourth place with a better goal difference.