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'
|Lacazette to ponder Lyon future|
|Griezmann lauds ´world class´ Aubameyang|
|Sporting´s in-demand Gelson going nowhere, claims agent|
|FA appoints new lead QC as scope of child sexual abuse review is outlined|
|Hodgson: England players failed to grasp my instructions|
|Xhaka pleads for time to settle in at Arsenal|
|Kluivert urges PSG to learn from Montpellier humbling|
|Augenthaler tips Bayern captain Lahm to play on|
|Rodgers: Celtic growing in confidence in Europe|
|Brazil-Colombia friendly proposed to raise money for Chapecoense|
|If you don´t play, you can´t shine - Hummels urges Mourinho to believe in Mkhitaryan|
|Ronaldinho ready to help Chapecoense|
|United can still finish top four - Guardiola|
|Bale´s ankle ´feeling better every day´|
|Sarri: Napoli in Lisbon to win|
|Watford and West Brom hit with FA charge|
|Karanka delighted with Boro´s game management|
|Middlesbrough 1 Hull City 0: Ramirez sinks sorry Tigers|
|Can Arsenal break the Basel curse? The Champions League in Opta Numbers|
|Everton confirm serious knee injury for Bolasie|
|Stam set for Old Trafford reunion in FA Cup third round|
|Sanchez, Ozil contract talks not just about money - Wenger|
|It is normal my son says I´ll coach Inter, I will - Simeone|
|Chapecoense confirmed as Copa Sudamericana champions|
|Sullivan backs Bilic to reverse Hammers´ fortunes|
|It was close...very close - Hummels reveals level of Man United interest|
|What You Might Have Missed: An FA Cup comeback of all comebacks and Monaco can´t stop scoring|
|Preston fans to be refunded from Beckford, Doyle fight fines|
|In-demand Lindelof ´happy to stay at Benfica´|
|FA charges City and Chelsea for late fracas|
|Darmstadt sack coach and sporting director after dismal run|
|Anyone who says they would not sign Messi is a liar! - Caballero|
|Roberto warns Madrid: Barcelona will cut the gap|
|Emery: Champions League top spot was always PSG´s priority|
|Guardiola brands Sanchez transfer rumours as lies|
|Boateng ruled out of Bayern´s clash with Atletico|
|FA confirms four-game ban for Aguero|
|Blatter FIFA ban remains after CAS dismisses appeal|
|Luis Enrique: I don´t give a damn about beating Gladbach|
|Emre hits out at Allardyce´s style... and slams his chewing gum|
|Bravo the world´s best goalkeeper, says Pellegrini|
|Ibrahimovic: I know how to kick someone and make him fall asleep|
|Barcelona and Real Madrid would not win 5-0 in Ligue 1 - Verratti|
|Seedorf out, Eriksson in at second-tier Chinese club|
|Tevez to China? Shanghai Shenhua claim ´breakthrough´ in talks|
|´English football is not more pure´ – Pochettino will not slam Alli for ´dive´|
|Gudjohnsen offers his services to Chapecoense|
|Savicevic: Champions League qualification paramount for Milan|
|Wenger: West Ham could take two years to settle|
|River Plate play in green as tribute to Chapecoense|
|Roberto Carlos open to coaching in A-League|
|Wenger confident there is more to come from Arsenal|
|Kane wants to see out career at Tottenham|
|Aguero challenge labelled ´crazy´ by disappointed Cahill|
|Mourinho ´has nothing to hide´ over tax affairs|
|Guardiola happy despite City setback|
|Ibrahimovic: I tried to avoid Coleman|
|Pogba hits out at ´distorted´ holiday claim|
|Nice 3 Toulouse 0: Plea strikes again as hosts go top|
|In-demand Belotti extends Torino stay|
|Mourinho defends decision to bring on Fellaini|
|Man Utd performances much better under me, says Mourinho|
|Draw the least Everton deserved against Manchester United, says Koeman|
|Mourinho fumes at media double standards|
|Mourinho has ´no thoughts´ on Fellaini penalty incident|
|Neville unimpressed by ´idiotic´ Fellaini|
|Manchester United are the Premier League´s worst team for dropping points with late goals|
|Manchester United mocked after Fellaini congratulations|
|´We have to put it right´ - Jones frustrated as United lose another late lead|
|Lulic sparks racism storm with Rudiger insult|
|Everton 1 Manchester United 1: Late Baines penalty denies Mourinho|
|Eto´o prefers Iniesta to Ronaldo and Messi: He deserves four Ballons d´Or|
|Liverpool join unfortunate group after Bournemouth collapse|
|Strootman praises Roma´s mental strength after derby win|
|Comeback win over Liverpool a special day for Bournemouth - Howe|
|Liverpool stopped playing football in Bournemouth collapse - Klopp|
|Lazio 0 Roma 2: Strootman and Nainggolan continue Giallorossi dominance|
|Bournemouth hero Ake hails incredible comeback win over Liverpool|
|Montella hails Lapadula´s ´fairytale´ rise to AC Milan stardom|
|Beautiful football is Guardiola´s Bayern legacy - Rummenigge|
|Bournemouth 4 Liverpool 3: Stunning comeback leaves Klopp´s men reeling|
|Lopes set for several weeks of treatment on ´sound trauma´|
|Lapadula: This is just the start of my Milan journey|
|AC Milan 2 Crotone 1: Lapadula winner spares Niang´s blushes|
|Torres fit for Bayern Munich clash|
|Dortmund´s Sahin fears eased|
|Eto´o: Guardiola still the best coach in the world|
|Carvajal apologises for swearing at Barcelona fans|
|MP calls for examination of Mourinho tax avoidance allegations|
|A-League Review: Sydney go six points clear at top as Adelaide clinch first win|
|Referee sorry amid fall-out from Werner dive controversy|
|Pique taking inspiration from 2014-15 turnaround|
|Aulas: Lyon should be awarded win after Metz clash is abandoned|
|Emery: PSG must learn from defeat|
|Marotta: Best to laugh at Pogba comments|
|Mourinho: I´m bringing back Manchester United DNA|
|De Boer: Nobody in charge at Inter|
|Chapecoense to be named Copa Sudamericana champions - Tozzo|
|Bilic: We are in a relegation fight|
|Aubameyang: I don´t know if I´ll be at Dortmund next season|
|Goals will return for Higuain, says Allegri|
|Southgate hopes to convince Zaha to play for England|
|Simeone will go to Inter, says son Giovanni|
|Watford fan dies after falling ill during West Brom clash|