Cristiano Ronaldo's goal saw Portugal beat Ghana 2-1 in Brasilia, but it proved academic as both sides crashed out of the FIFA World Cup.
Coming into the final Group G clash, both sides knew only victory would give them a chance of progressing to the second round, and even then they were dependent on the game between Germany and the United States, with a draw in Recife good enough to see those two teams through regardless of events in the capital.
Portugal, needing a five-goal swing to overtake the USA in second place, went in front after 30 minutes when Ghana defender John Boye's wild clearance from Miguel Veloso's cross diverted the ball over goalkeeper Fatawu Dauda and into the net.
Ghana responded in the second half, Asamoah Gyan's header making him the highest ever scorer for an African nation at World Cup finals, surpassing the mark of five set by Cameroon's Roger Milla.
With Germany beating the Americans 1-0 on Thursday, a 2-1 victory for Kwesi Appiah's men would have seem them through and Abdul Majeed Waris was guilty of a glaring miss shortly after Gyan's equaliser, nodding wide from close-range with no defenders around him.
They were left to rue that miss 10 minutes from time, Ronaldo firing home from 12 yards after a defensive mix-up between Jonathan Mensah and Dauda, the keeper flapping hopelessly at a high ball.
Portugal made four changes from the side that drew 2-2 with the United States, while Ghana showed two alterations, Waris and Emmanuel Agyemang-Badu coming in for Kevin-Prince Boateng and Sulley Muntari, suspended by the Ghanaian Football Association for alleged disciplinary breaches.
Ronaldo had the first effort of note in the fifth minute as his audacious lob from wide on the right caught out Dauda but struck the crossbar and rebounded to safety.
The Portugal captain threatened again seven minutes later, testing Dauda with a trademark dipping free-kick from 30 yards.
Ronaldo was at the forefront of all of Portugal's attacking play and ought to have put his side ahead in the 19th minute.
Joao Pereira delivered a pinpoint ball from the right and the Real Madrid man, unmarked six yards from goal, directed his header straight at Dauda, who parried away.
A minute later Ghana almost hit the front as Gyan was denied by the legs of Beto after the Portugal defence failed to deal with an aerial ball.
Portugal continued to make most of the running and got their noses in front on the half-hour mark, Boye slicing Veloso's cross from the left into the net via the bar and right-hand post.
Ronaldo brought another save out of Dauda two minutes later, while Gyan continued to pose a danger, heading wide after meeting Christian Atsu's cross.
After a quiet start to the second half Ghana equalised with 57 minutes gone, Gyan nodding home at the far post following a superb cross from Kwadwo Asamoah with the outside of his left foot.
Waris wasted a glorious chance to put Ghana in front four minutes later, somehow heading wide from six yards after being picked out by Gyan.
Ronaldo - relatively quiet throughout the tournament - ultimately had the final say as he lashed in a left-footed strike after Dauda feebly palmed Mensah's wayward header into his path, but it mattered little as both sides' hopes were dashed.
|Coach: Paulo Bento|
for João Pereira 61'
for Éder 69'
for Beto 89'
|European Super League could cause ´war´|
|Sampdoria pounce for Praet|
|Zaza agent confirms Napoli talks but rules out loan move|
|No Grigg in Northern Ireland´s World Cup qualifying squad|
|Cahill reflects on ´amazing´ Melbourne City debut|
|Europa League must take priority, Recoba tells Inter|
|Saint-Etienne swoop for Saivet and Veretout|
|Ronaldo: Pepe was the best player at the Euros, not Griezmann|
|Schweinsteiger: Manchester United my last club in Europe|
|Dante sees Nice as a positive move|
|Pique: Barcelona by far the best in Spain|
|Pique backs Stones for success under Pep|
|Coleman dismisses Premier League talk|
|Spurs want Calhanoglu, claims agent|
|Bony an ´option´ for Bilic|
|Leverkusen cannot challenge Bayern, says Ballack|
|Pallotta blasts ´disgusting´ referee after Roma defeat|
|Badstuber taking his time after injury nightmare|
|Conte: Terry return between him and Allardyce|
|We beat Bayern to Dembele - Watzke|
|Wanderers bring back Bulut|
|Moyes rules out Kone exit|
|CONCACAF Champions League Review: Whitecaps, Pachuca win big|
|Bale: I´ll never forget this year|
|Griezmann: I deserve Best Player in Europe Award|
|No surgery for Ayew as West Ham target December return|
|Villarreal did all they could to make it through - Escriba|
|Spalletti rues lack of Roma discipline|
|Conte: Chelsea must learn to kill matches|
|Watford and West Brom crash out of League Cup|
|My longest 90 minutes as a coach - Rodgers|
|AFC Champions League: Goalless draws leave quarter-finals on a knife edge|
|Klopp hopeful over Can injury|
|Champions League play-offs: Nine-man Roma crash out as Monaco edge Villarreal|
|Henderson hails ´outstanding´ Mane after Burton thrashing|
|Chelsea 3 Bristol Rovers 2: Conte´s side survive scare thanks to Batshuayi double|
|Hapoel Be´er Sheva 2 Celtic 0 (4-5 agg): Visitors survive Israeli scare|
|Burton Albion 0 Liverpool 5: Sturridge at the double in Reds rout|
|Leverkusen sign Austria star Dragovic|
|Sakho in the clear as WADA opt against appeal|
|Enyimba 3 Mamelodi Sundowns 1: Udoh brace secures CAF Champions League win|
|Pulisic and Ramos on target as Dortmund wrap up Bundesliga preparations|
|Calleri hoping for Tevez advice|
|Defour hoping for Belgium recall|
|Alaba warns against complacency as Bayern begin Bundesliga defence|
|Bravo arrives in Manchester ahead of City move|
|Dyche backs Gray after striker´s apology for homophobic tweets|
|Gray charged by FA over homophobic tweets|
|Pique: Olympic gold proves Neymar is one of world´s best|
|Marin makes Olympiacos move|
|Zidane arrival the catalyst for one of my best seasons - Ronaldo|
|Moyes ´worried´ about Mannone elbow injury|
|Sidibe rejected Arsenal over playing-time fears|
|Guardiola: Toure could feature against Steaua|
|Hernandez out for two weeks after falling down stairs|
|Bravo nearing City move, admits Guardiola|
|Ballack impressed by Dortmund signings but still backing Bayern|
|Lucescu questions De Boer tactics|
|Milan reject Chelsea bid for Romagnoli|
|Dortmund know how to treat Gotze - Ballack|
|Shevchenko: Bacca must improve consistency|
|´If you heed 100 idiots you will go crazy´ - Bauza on Messi return|
|Valdano relieved over Messi U-turn|
|Nordfeldt in line for loan move after signing fresh Swans deal|
|Dante joins Nice from Wolfsburg|
|De Boer expects fierce fight for Barca number-one spot|
|Newell´s confident over Messi return|
|Stoke confirm Jones interest|
|MLS ´attractive´ to Rooney - Timbers owner|
|Burke re-signs with West Ham|
|Sassuolo rejected Balotelli - CEO|
|Valencia coach Ayestaran rules out Mustafi sale|
|Allardyce plans Guardiola talks over Hart|
|Cahill warns rivals over City attack|
|Allardyce open to Terry England return|
|Drogba dismisses Villa rumours|
|Tuchel pleased despite Dortmund wastefulness|
|Stam´s Reading sign Manchester United youngster Blackett|
|Champions League place main objective for Rodgers|
|Eintracht Trier 0 Borussia Dortmund 3: Kagawa at the double as Tuchel´s men stroll|
|Escriba urges cool heads in Monaco|
|Cherchesov sets bar high for Russia|
|Tite defends Neymar´s captaincy credentials|
|Ancelotti wowed by fit-again Martinez|
|Spalletti: If Roma players are afraid, I don´t want them|
|Klopp laments Origi´s absent rhythm|
|Barcelona let Neymar stay in Brazil ahead of qualifiers|
|De Jong brothers joins forces at PSV|
|Rudiger returns to training|
|Liverpool transfer talk frustrates Klopp|
|Klopp demands final third improvements|
|Everton loan Galloway to West Brom|
|Manchester United loan Borthwick-Jackson to Wolves|
|Braithwaite to snub Premier League interest to stay at Toulouse|
|Strachan leaves out McCormack, Rhodes|
|Napoli plan to limit media commitments|
|Taarabt eager to make Marseille switch|
|Kruse suffers knee ligament injury|
|Rummenigge expects Ribery to be targeted|
|Delaney: Benteke is not Messi, he needs service|
|Ballack urges patience with Pep over City project|
|James happy at Real Madrid - Zidane|
|Harper backs Phelan for permanent Hull role|
|Flexibility the key for Allardyce|
|Allardyce concerned over Hart situation|
|De Bruyne praises Sterling reaction|
|Cavani vows to improve strike rate|
|Britton signs Swansea extension|
|Higuain motivated by ´fat´ comments|
|Conte perplexed by Costa criticism|
|Drinkwater poised to sign new Leicester contract|
|Bobo completes Sydney move|
|Bilic: You can´t count on Carroll|
|MLS Review: Dempsey´s Sounders sink rivals Timbers|
|Zidane: Important year for Bale|
|Galaxy star Rogers alleges homophobic abuse|
|Vieira: Pogba just needs to be himself|
|Bacca: I made a promise to Milan|
|Angry Handanovic critical of Inter|
|Gameiro: Atletico must win at home|
|Klopp: I´d be an idiot if I made a panic buy|
|Simeone: Draw leaves a bad taste in my mouth|
|Montella: Milan must win back fans|
|Asensio revels in goalscoring LaLiga debut for Madrid|
|Atletico Madrid 1 Alaves 1: Hosts denied in dramatic finale|