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'
|Lovren: Anfield inspired Liverpool|
|Suarez congratulates Liverpool on reaching Europa League final|
|Howe already plotting for next season|
|Griezmann: Who cares if we play ugly?|
|Copa Libertadores Review: Boca, Rosario through to quarter-finals|
|Emery: Sevilla love the Europa League|
|Verratti: I always tell Ibrahimovic to stay at PSG, but he never answers!|
|Marcelino unimpressed by Klopp celebrations|
|Merson wants Koeman at Arsenal|
|´I would not like to be him for one second in my life´ - Klopp slams Marcelino|
|Allardyce: We cannot lose our cool like Tottenham|
|Rashford reminds me of me – Ronaldo|
|£170m windfall for winners of Boro-Brighton clash|
|Martinez: Leicester have not changed English football|
|Marcelino: Liverpool pushed the boundaries|
|City struggled to cope with semi-final occasion - Bale|
|Mahrez wants Leicester stay, says vice-chairman|
|Shakhtar deserved more - Lucescu|
|Klopp hails Liverpool players after ´wonderful night´|
|Sturridge all smiles after returning to lead Liverpool into final|
|Reaching the Europa League final again is a dream - Gameiro|
|Sevilla 3 Shakhtar Donetsk 1 (5-3 agg): Gameiro brace books holders´ third straight final|
|Liverpool 3 Villarreal 0 (3-1 agg): Anfield comeback sends Klopp´s men into final|
|Bologna v Milan: De Sciglio targeting European qualification|
|Leicester players ´love each other´ - vice-chairman Srivaddhanaprabha|
|Simeone rates all-Madrid Champions League final as ´50-50´|
|Eintracht Frankfurt v Borussia Dortmund: Tuchel´s men hope to extend title race|
|Crystal Palace v Stoke City: League points the priority for Pardew|
|Gray determined to prove himself at Leicester|
|Inter v Empoli: Kondogbia wants to end San Siro drought|
|Norwich City v Manchester United: Van Gaal gives United no excuses|
|Olic brands Guardiola a failure|
|Pardew seeks Leicester inspiration for FA Cup final|
|Atletico boosted by Tiago return|
|Casillas rules out Miami switch|
|Sunderland v Chelsea: Larsson eyes crucial victory|
|Dyke confirms Spurs set for Wembley stay|
|West Ham v Swansea City: Payet credits Bilic for impressive Hammers form|
|Fellaini must learn to control himself - Van Gaal|
|Kaka omitted from Brazil´s Copa America squad|
|Gazelec Ajaccio v Paris Saint-Germain: Relegation-threatened hosts eye vital win|
|Leicester City v Everton: Ranieri ready to celebrate remarkable title triumph|
|Stoke´s Joselu slams Toure and Manchester City|
|´We are the champions´ - Shaq sends musical congratulations to Northampton|
|Huth and Fellaini handed three-match bans|
|Lee set for Crystal Palace fine after Pardew remarks|
|AFC Bournemouth v West Brom: Howe feared injuries would curtail Premier League dream|
|Ranieri will not ´break´ Leicester dressing room with star names|
|Pepe: Benitez told me I was not needed|
|Ingolstadt v Bayern Munich: Title in sight for Guardiola´s men|
|Mahrez 50-50 to stay at Leicester - agent|
|Tough to emulate ´inspirational´ Leicester, warns Martinez|
|Bendtner in training at FC Copenhagen|
|Aston Villa v Newcastle United: Wijnaldum demands result to keep survival bid alive|
|Ibrahimovic could make sensational San Siro return - Raiola|
|Obertan, Marveaux released by Newcastle|
|Jovetic wants Toure, Zabaleta at Inter|
|Ramos admires Champions League final rival Simeone|
|Gotze too nice for Bayern Munich ´sharks´ - Augenthaler|
|Bale hits back at Pellegrini ´lucky´ claim|
|Jovetic desperate to earn Inter stay|
|Lucky Madrid no better than Man City - Pellegrini|
|Ferdinand slams City´s lack of desire in Champions League exit|
|Kroos: Madrid have more quality than Atletico|
|Keane: United lack character|
|Klopp: Villarreal in for tough time at Anfield|
|Copa Libertadores Review: Nacional advance to quarters, River eliminated|
|PFA chief wants Leicester stars to be honoured|
|Argentina recall Tevez for initial Copa America squad|
|Keane focused on the Republic of Ireland, not Celtic|
|Ronaldo reiterates desire for Zidane to continue as Madrid coach|
|Keane: City need to improve to win Champions League|
|Falcao left out of Colombia´s Copa America squad|
|Carragher: Sturridge must start against Villarreal|
|De La Hoya´s clanger: ´Whoever thought Leicester would win the UEFA Cup?´|
|Marotta: City asked, but it´s not time to sell Pogba|
|Marcelino wants to turn Anfield atmosphere in Villarreal´s favour|
|Marcelo calls for La Liga focus after Madrid reach Champions League final|
|Origi hopeful of returning before season´s end|
|Madrid were the better side, insists Ronaldo|
|Mangala: City should be proud of semi-final run|
|Madrid move motivated by Champions League glory, says Bale|
|We will leave our soul in the final - Ramos|
|Hart left broken by ´very lucky´ Madrid goal|
|Zidane hails victorious Madrid|
|Pellegrini disappointed to miss out in tie of few chances|
|Real Madrid 1 Manchester City 0 (1-0 agg): Zidane´s men set up 2014 final repeat|
|Lucescu: Shakhtar ready for hardest fight|
|´Benteke cost almost Villarreal´s budget!´ - Marcelino expects major Liverpool test|
|AFC Champions League Review: Big-spending Jiangsu Suning dumped out|
|Kompany off injured in Champions League semi|
|Ter Stegen: I want to stay at Barcelona|
|Vardy will thrive for England at Euro 2016, says Smith|
|Lemina eyes key role at Juventus|
|Cerezo hits back at Vidal´s ´ugly´ swipe|
|Bacca happy at Milan without European football, says agent|
|Long backs Saints to end Spurs hoodoo|
|West Ham´s Sullivan labels Leicester lucky|
|Alba admires Atletico team work|
|Ranieri deserves an honour - Italian prime minister|
|Klopp bullish ahead of semi-final showdown|
|Ranieri´s 96-year-old mother: Now my son is King of England|
|Lovren: Europa League final would save Liverpool´s season|
|BREAKING NEWS: Dembele set for long FA ban over Costa altercation|
|AC Milan ultras call for Galliani´s head over ´blatant mockery´ of fans|
|Emery wants ´inspired´ Konoplyanka in Europa League semi-final|
|Wendell Lira blames Puskas Award trip for club woes|
|Joe Cole in line for Tampa Bay Rowdies move|
|Fuchs: I could kiss Hazard after title-clinching goal|
|Hiddink turned down Leicester before Ranieri appointment|
|Arsenal did not hold their nerve in title race - Smith|
|Cazorla targets City comeback for Arsenal|
|Webb could face lifelong ban as FIFA opens proceedings|
|Smith backs Leicester to become Premier League ´force´|
|Toni to retire after Juventus clash|
|Iwobi reveals key to dream Arsenal rise|
|Allen expects to reach Europa League final|
|McLeish leaves Zamalek after 65 days|
|Football fans pile bets on Burnley to win Premier League after Leicester´s shock success|
|Ranieri: Rich teams will win for next 10 to 20 years|
|Pity we could not reward Guardiola for his three years, says Bayern captain Lahm|
|Madrid revenge no factor for Simeone|
|Copa Libertadores Review: Pumas UNAM, Atletico Nacional advance to quarter-finals|
|Adelaide want Leicester City friendly|
|Tottenham have proven critics wrong - Eriksen|
|Ferdinand ´turned on´ by Simeone´s Atletico|
|Wilson hoping Brighton experience enough for United|
|Griezmann urges team-mates to keep feet on the ground|
|We´ve learned from past errors - Fernandinho|
|Payet cleans up West Ham awards|
|´We don´t need superstars´ - Ranieri|
|Vidal: Bayern are still the best in the world|
|Guardiola: I have given my life to Bayern|
|Simeone: Atletico have eliminated two of the world´s three best teams|
|Leicester owner reveals Vardy signing doubts|
|Bayern feel cheated, says Rummenigge|