Uruguay beat Ghana but went out of the World Cup on goals scored as they finished third behind South Korea in Group H, despite Luiz Suarez's heroics.
The Uruguay striker played a major role in both of Uruguay's goals and the 35-year-old was in tears after the final whistle, following what may have been his last international.
Both goals were scored by Giorgio de Arrascaeta, the first a close-range header, the second a sublime volley.
In Group H's other game, South Korea's 2-1 victory over group winners Portugal was enough to take them through in second place.
Uruguay and South Korea both ended with a zero goal difference, but the side from Asia netted a total of four goals in their three games, with the South American team scoring just the two they managed against Ghana.
Suarez, whose handball in their previous meeting 12 years ago played a crucial role in sending his side through on that occasion, saw his shot fall into De Arrascaeta's path for the opener, before the veteran former Liverpool striker followed it up with a glorious assist for the second.
There had been early penalty drama when Ghana striker Andre Ayew saw his spot-kick saved by Sergio Rochet at 0-0. The penalty was awarded by the referee after reviewing the goalkeeper's foul on Mohammed Kudus on the pitchside monitor.
Agony for Uruguay
One word was circulating in the build-up to this game - "revenge".
Ghana came into the grudge match with hopes of avenging the defeat from 2010, when Suarez handled the ball on the line and was sent off, before wildly celebrating Asamoah Gyan's miss from the resulting penalty.
Ghana lost the shootout that followed, and there was plenty of drama this time round too.
At 2-0 up, Uruguay thought they were progressing to the last 16, but news filtered through of South Korea's comeback against Portugal.
Suarez, who was subbed off on 65 minutes for Edinson Cavani, sat on the bench in disbelief as he was made aware of the final result in the other game.
At full-time, the emotional striker was consoled on the pitch by captain Diogo Godin - both veterans might have been seen in a Uruguay shirt for the last time.
Ghana should have taken the lead, but like Gyan in 2010, Andre Ayew failed to convert and it proved extremely costly.
Otto Addo's men needed some inspiration in the second period but were unable to find a way through an obdurate Uruguayan defence as Kudus saw a low drive tipped wide by Rochet late on.
Uruguay had scored twice before the break and with time running out they pushed for the winner, but Federico Valverde's effort was palmed away by Lawrence Ati-Zigi, who also made a stunning stop to keep out Cavani's header.
Player of the match
KudusMohammed Kudus
Ghana
Squad number20Player nameKudus
Squad number5Player namePartey
Squad number18Player nameAmartey
Squad number4Player nameSalisu
Squad number17Player nameBaba
Squad number19Player nameWilliams
Squad number21Player nameAbdul Samed
Squad number1Player nameAti-Zigi
Squad number22Player nameSulemana
Squad number25Player nameSemenyo
Squad number11Player nameBukari
Squad number7Player nameFatawu
Squad number9Player nameJ Ayew
Squad number8Player nameKyereh
Squad number10Player nameA Ayew
Squad number26Player nameSeidu
Uruguay
Squad number10Player namede Arrascaeta
Squad number23Player nameRochet
Squad number6Player nameBentancur
Squad number11Player nameNúñez
Squad number15Player nameValverde
Squad number8Player namePellistri
Squad number24Player nameCanobbio
Squad number13Player nameVarela
Squad number5Player nameVecino
Squad number16Player nameOlivera
Squad number2Player nameGiménez
Squad number18Player nameGómez
Squad number7Player namede la Cruz
Squad number21Player nameCavani
Squad number19Player nameCoates
Squad number9Player nameSuárez
Line-ups
Ghana
Formation 4-2-3-1
1Ati-Zigi
26Seidu18Amartey4Salisu17Baba
5Partey21Abdul Samed
19Williams10A Ayew9J Ayew
20Kudus
1Ati-Zigi26SeiduBooked at 90mins18Amartey4Salisu17Baba5Partey21Abdul SamedSubstituted forKyerehat 72'minutes19WilliamsSubstituted forSemenyoat 72'minutes10A AyewSubstituted forBukariat 45'minutes9J AyewSubstituted forSulemanaat 45'minutesBooked at 86mins20KudusSubstituted forFatawuat 90+8'minutesSubstitutes
2Lamptey3Odoi6Owusu7Fatawu8Kyereh11Bukari12Danlad13Afriyie14Mensah15Aidoo16Nurudeen22Sulemana23Djiku24Sowah25SemenyoUruguay
Formation 4-4-2
23Rochet
13Varela2Giménez19Coates16Olivera
8Pellistri15Valverde6Bentancur10de Arrascaeta
9Suárez11Núñez
23Rochet13Varela2GiménezBooked at 90mins19CoatesBooked at 87mins16Olivera8PellistriSubstituted forde la Cruzat 66'minutes15Valverde6BentancurSubstituted forVecinoat 34'minutes10de ArrascaetaSubstituted forCanobbioat 80'minutes9SuárezBooked at 60minsSubstituted forCavaniat 66'minutesBooked at 90mins11NúñezBooked at 19minsSubstituted forGómezat 80'minutesSubstitutes
1Muslera3Godín5Vecino7de la Cruz12Sosa14Torreira17Viña18Gómez20Torres21Cavani22Cáceres24Canobbio25Ugarte26RodríguezReferee:Daniel SiebertAttendance:43,443Live Text
Match ends, Ghana 0, Uruguay 2.
José Giménez (Uruguay) is shown the yellow card.
Edinson Cavani (Uruguay) is shown the yellow card.
Second Half ends, Ghana 0, Uruguay 2.
Attempt saved. Nicolás de la Cruz (Uruguay) right footed shot from outside the box is saved in the bottom left corner.
Alidu Seidu (Ghana) is shown the yellow card for a bad foul.
Maximiliano Gómez (Uruguay) wins a free kick in the attacking half.
Foul by Alidu Seidu (Ghana).
Substitution, Ghana. Issahaku Fatawu replaces Mohammed Kudus.
Attempt missed. Sebastián Coates (Uruguay) right footed shot from the centre of the box is close, but misses to the right. Assisted by Edinson Cavani.
Attempt saved. Kamaldeen Sulemana (Ghana) right footed shot from outside the box is saved in the bottom left corner. Assisted by Osman Bukari.
Corner, Uruguay. Conceded by Lawrence Ati-Zigi.
Attempt saved. Maximiliano Gómez (Uruguay) right footed shot from outside the box is saved in the bottom left corner. Assisted by Edinson Cavani.
Attempt blocked. Mohammed Kudus (Ghana) left footed shot from the centre of the box is blocked. Assisted by Abdul Rahman Baba with a cross.
Foul by Abdul Rahman Baba (Ghana).
Agustín Canobbio (Uruguay) wins a free kick in the defensive half.
Offside, Ghana. Mohammed Kudus tries a through ball, but Antoine Semenyo is caught offside.
Foul by Thomas Partey (Ghana).
Nicolás de la Cruz (Uruguay) wins a free kick in the attacking half.
Offside, Uruguay. Nicolás de la Cruz tries a through ball, but Edinson Cavani is caught offside.
Get the latest results and goal notifications for any team at the Fifa World Cup by downloading the BBC Sport app: Appleexternal-link - Androidexternal-link - Amazonexternal-link
Get your daily dose of Fifa World Cup reaction, debate & analysis with World Cup Daily on BBC Sounds