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'
|League One Preview: Sheffield United and Yeovil back in league action after cup exploits|
|Real Madrid v San Lorenzo: Casillas set for landmark appearance in final|
|Ronaldo more impressive than Messi, says Carlos|
|Poyet desperate for recruitments|
|Palace suffer Chamakh blow|
|Germany end year at top of FIFA rankings|
|Martinez calms Mirallas injury fears|
|Clayton ruled out for the season|
|Cabaye pleased to play full game|
|Klopp upbeat despite late equaliser|
|Cech: We can be best ever Chelsea side|
|Newcastle face goalkeeper crisis ahead of derby|
|Werder Bremen v Borussia Dortmund: Bundesliga stugglers targeting morale-boosting win|
|Medellin 1 Santa Fe 2: Visitors fight back to win|
|Barcelona 1 Emelec 1: Ecuadorian Primera A Third Stage play-off evenly poised|
|Sporting Cristal 0 Juan Aurich 0: Third leg required to decide Peruvian champions|
|Bauza ´delighted´ after San Lorenzo reach final|
|Paris Saint-Germain v Montpellier: PSG look to build|
|Bundesliga Preview: Bayern seeking to extend unbeaten start before winter break|
|Contra, Michel join Guangzhou R&F|
|Naismith signs Everton extension|
|Palestino 3 Santiago Wanderers 1: Title drought almost over for hosts|
|Copa del Rey Review: Finnbogason breaks drought in Sociedad win|
|Coupe de la Ligue Review: PSG scrape into quarters, Lille, Monaco win on penalties|
|Worcester City 1 Scunthorpe United 1 (aet, 13-14 on pens): League side narrowly avoid shock|
|Stambouli hails ´perfect´ Tottenham|
|Goals win games - Pardew|
|Bundesliga Review: Dortmund held by late equaliser, Leverkusen beat Bremen|
|PSV 4 Feyenoord 3: De Jong hat-trick helps settle thriller|
|Rodgers hails ´brilliant´ Liverpool|
|Eredivisie Preview: Leaders PSV take on struggling Eagles|
|Madoui hails second-half display|
|Championship Preview: Reading´s Clarke era begins at Watford|
|Liverpool to meet Chelsea in League Cup semi-finals|
|San Lorenzo 2 Auckland City 1: Extra time required to book Real final|
|AC Ajaccio 1 PSG 3: Late show sends holders through|
|Bournemouth 1 Liverpool 3: Sterling brace helps ease pressure|
|Tottenham 4 Newcastle United 0: Pochettino´s men march into semi-finals|
|Borussia Dortmund 2 Wolfsburg 2: Naldo denies Klopp´s strugglers|
|League Two Preview: Moore looks for fighting spirit, Accrington aim to bounce back|
|Allegri has suspension overturned|
|ES Setif 2 Western Sydney Wanderers 2 (5-4 on pens): Algerians rely on penalties to finish fifth|
|Ligue 1 Preview: Fournier not expecting to claim top spot, Marseille entertain Lille|
|Indian Super League Review: Kerala through to face Kolkata in final|
|Lasogga suffers thigh strain|
|Michael Garcia FIFA resignation notice in full|
|Bayern draw not ideal - Lucescu|
|Garcia resigns from FIFA role|
|Mainz v Bayern Munich: Bavarians on brink of more records|
|Garcia to fight two-match ban|
|Green backs Mignolet to return stronger|
|Mandzukic and Koke to lead inexperienced Atleti XI|
|Fonte apologises to fans after cup defeat|
|Metz suspend Maiga after unauthorised absence|
|Agent: Cole settled at Roma|
|Bayern duo sign new deals|
|Allegri calls for Juve focus ahead of Cagliari trip|
|Pearson accepts FA charge after fan row|
|Mourinho rules out January signings|
|Schaars set for PSV absence after knee surgery|
|Traore wants more Barca chances|
|Hamann hopes Liverpool receive cup boost|
|Lukaku wants Everton to produce Premier League best in Europe|
|La Liga Preview: Barca host Cordoba, Atletico travel to Bilbao|
|A-League Preview: Berisha crucial for Milligan-less Victory|
|Tena: Real ´by far the better team´|
|Blanc avoids Mourinho mind games, hails retiring Henry|
|Hecking convinced Dortmund remain dangerous|
|United´s Jones insists injuries are behind him|
|Henry: Managing Arsenal is my dream|
|Hard to imagine a better performance - Luis Enrique|
|Copa del Rey Review: Goals rain in Spain|
|Benatia to sit out Mainz clash|
|Koeman slams ´disrespectful´ Sheffield United|
|Barcelona 8 Huesca 1 (12-1 agg): Pedro treble sets up big win|
|Coupe de la Ligue Review: Nantes come from two down, Bastia knock out Caen|
|Penalty save was key, says Ancelotti|
|Mourinho pleased with professional approach in Derby win|
|FA Cup Review: Yeovil set up Man United clash, Tranmere to face Swansea|
|Bundesliga Review: Stuttgart move off bottom, Bayern win again|
|Sheffield United 1 Southampton 0: McNulty secures semi-final spot for third-tier side|
|Derby County 1 Chelsea 3: Premier League leaders progress|
|Cruz Azul 0 Real Madrid 4: Spanish giants cruise into final|
|Bayern Munich 2 Freiburg 0: 100 not out for Robben as champions cruise|
|Cagliari v Juventus: Barzagli unconcerned by successive draws|
|ECA and EPFL make case for May World Cup in 2022|
|Atletico Madrid v L´Hospitalet: Simeone likely to rotate|
|Serie A Preview: Morata chasing goals, Roma host Milan|
|Hartlepool appoint Moore following takeover|
|Parma appoint new president|
|Garcia handed two-match ban|
|Reading appoint Clarke to replace Adkins|
|Conte rules out resignation|
|Adebayor will not face Newcastle - Pochettino|
|Zhang seals Wolfsburg switch|
|SFA rejects Tonev appeal|
|Garcia report appeal rejected by FIFA|
|Herrera denies involvement in match-fixing|
|Thierry Henry: Moments that defined a genius|
|UEFA opens proceedings against Celtic|
|Rodgers denies talk of dressing-room rift|
|Jonas will be given a chance - Pardew|
|AFC asks Australia to increase security for Asian Cup|
|D´Ambrosio sets Inter sights on third|
|Williams wants Swansea to share goalscoring burden|
|Saudi Arabia appoint Olaroiu|
|Martinez lauds Barkley|
|Thierry Henry announces retirement|
|Rooney: United can win title|
|ES Setif v Western Sydney Wanderers: Topor-Stanley to miss fifth-place play-off|
|Beasley calls time on international career|
|Tena: We expect to face Real´s best|
|Martinez wary of Young Boys´ artificial pitch|
|Dudek: Everyone under pressure at Liverpool|
|Martinez hails ´devastating´ attack|
|Redknapp: QPR´s road woes more than bad luck|
|Defeat harsh on QPR - Redknapp|