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'
|Serie A Review: Roma drop more points, Genoa and Fiorentina draw|
|Ligue 1 Review: Marseille return to second, Montpellier held|
|Eredivisie Review: PSV go nine points clear, Twente steal last-gasp win|
|Tunisia 1 Equatorial Guinea 2 (aet): Balboa brace sends hosts through|
|Klopp encouraged by Leverkusen stalemate, as Dortmund hit bottom|
|No-show again from Mourinho after City draw|
|Pellegrini suggests different styles shown by City and Chelsea|
|Le Roy dejected following Congo´s Africa Cup of Nations exit|
|Bundesliga Review: Dortmund bottom, Paderborn thumped|
|Simeone marvels at Griezmann improvement|
|Emulating Messi will be tough for Neymar - Luis Enrique|
|Ibenge revels in DR Congo fightback|
|Reception delights Lampard on Stamford Bridge homecoming|
|Milan to downsize from San Siro|
|League Two Review: Luton claim Cambridge double, Shrewsbury stay top|
|Matic feels the effects of Liverpool match in City draw|
|West Brom lacked tempo, says Pulis|
|Pochettino remains grounded|
|Lukaku can inspire Everton - Martinez|
|Bayer Leverkusen 0 Borussia Dortmund 0: Frustrating draw leaves BVB bottom|
|Chelsea 1 Manchester City 1: Advantage Mourinho as top two share the spoils|
|Pardew laments lack of guile in Everton defeat|
|Poyet hoping to build on Burnley victory|
|Ancelotti lauds ´fantastic´ Benzema|
|Dyche backs Ings to bounce back after ´off-day´|
|Pearson brushes off ´bonus game´ defeat|
|Eibar 1 Atletico Madrid 3: Griezmann and Mandzukic inspire champions´ response|
|Rodgers delighted with Sturridge´s goalscoring return|
|QPR not as bad as scoreline suggests - Redknapp|
|League One Review: Bradford pushed hard as MK Dons go top|
|United killed the game too much - Van Gaal|
|Hughes hails hat-trick hero Walters|
|Congo 2 Democratic Republic of Congo 4: Mbokani strikes twice in remarkable fightback|
|Talks break down over Fletcher´s West Ham switch|
|Scottish Premiership Review: Highland derby all square|
|Championship Review: Derby and Boro stay in touch with leaders|
|Good enough for Real Madrid or Barcelona? - Luongo is Socceroos´ next superstar|
|Bruce backs Elmohamady after ´horrible afternoon´|
|Crystal Palace 0 Everton 1: Lukaku ends Palace run|
|Stoke City 3 QPR 1: Walters hat-trick seals win for hosts|
|Liverpool 2 West Ham 0: Sturridge on target in long-awaited return|
|West Brom 0 Tottenham 3: Kane at the double to down Albion|
|Manchester United 3 Leicester City 1: Van Gaal´s hosts avenge humiliating defeat|
|Real Madrid 4 Real Sociedad 1: Benzema stars in Ronaldo´s absence|
|Sunderland 2 Burnley 0: Defoe nets in routine victory|
|Roma snap up Doumbia|
|Huddersfield defender Smith stable after being airlifted to hospital|
|Carver: More to come from Cabella|
|Ivory Coast v Algeria: Renard demands success|
|Match winner Troisi hails Socceroo colleagues|
|Ghana v Guinea: Grant´s men tackle team happy with their lot|
|Australia deserved victory - Ki|
|Inzaghi ready to unleash duo against Parma|
|Cahill: Socceroos triumph to super-charge football in Oz|
|Hull City 0 Newcastle United 3: Carver up and running after routine win|
|Stielike: South Korea still champions|
|Recruitment proving difficult for Mancini|
|Postecoglou targets World Cup impact|
|Allegri dismisses talk of Vidal rift|
|Australia 2 South Korea 1 (aet): Troisi seals Socceroos´ maiden Asian Cup title|
|Ibrahimovic questions PSG fans|
|Azpilicueta anticipating ´weird´ Lampard return|
|Sinclair: Milner praise for Villa made my decision easy|
|Van Gaal fumes at questions on Herrera´s future|
|Cork excited about new challenge|
|Arsenal still gunning for glory - Gibbs|
|Quinteros named Ecuador coach|
|Sturridge eager to prove fitness|
|Blanc: ´We were expecting better´|
|Hecking proud of Wolfsburg|
|Boateng urges Bayern to learn from Wolfsburg thrashing|
|Sporting Braga 1 Moreirense 0: Santos the hero for hosts|
|Cordoba complete triple swoop, Levante bring in two|
|Partick Thistle 0 St Mirren 1: Debutant Dayton the hero|
|Rayo Vallecano 1 Deportivo La Coruna 2: Borges debut double downs hosts|
|Bournemouth 2 Watford 0: Championship leaders stroll to success|
|Dordrecht 0 Heerenveen 0: Visitors´ woes compounded by Sinkgraven sale|
|Paris Saint-Germain 1 Rennes 0: Lavezzi goal enough for champions|
|Palace confirm Souare capture|
|Barcelona v Villarreal: Xavi looking to put high-flyers in their place|
|Simeone denies gesture towards referee|
|Wolfsburg 4 Bayern Munich 1: Dost and De Bruyne at the double as hosts honour Malanda|
|Ben Arfa ineligible to play for Nice|
|Ginola calls time on FIFA presidency bid|
|Cork seals Swansea switch|
|Arsenal v Aston Villa: Wenger lauds team spirit|
|Strootman out for longer than expected|
|Southampton v Swansea City: Monk eager for return to form|
|Injury blow for Southampton striker Long|
|Montella confirms Cuadrado will join Chelsea|
|Bordeaux bring in Chantome from PSG|
|Huth suspended for two matches over tweets|
|Udinese v Juventus: Pirlo not taking Serie A lead for granted|
|Carlisle to return home|
|Prince Ali outlines campaign after submitting FIFA president bid|
|Costa must improve behaviour - Pellegrini|
|Olic seals Hamburg return|
|FIFPro planning legal action to protect unpaid players|
|Burnley rule out Liverpool move for Ings|
|Pochettino fumes at Tottenham schedule|
|Cork set for Swansea switch|
|Hull left in the cold by local gas board|
|Ancelotti: No repeat of Ronaldo indiscretion|
|Murray signs Palace extension|
|Garcia: Roma will sign a replacement for Destro|
|Sassuolo v Inter: Ranocchia hopes turning point has come|
|Congo v Democratic Republic of Congo: Neighbours clash in AFCON quarter-final|
|Fletcher in West Ham talks|
|Tunisia v Equatorial Guinea: Favourites wary of hosts|
|Carrick to miss four weeks|
|Figo submits bid for FIFA presidency|
|Costa hit with three-match ban|
|Villa confirm Sinclair loan|
|Hull agree fee for N´Doye|
|Milan clubs should merge, says agent Raiola|
|Redknapp brands Fer speculation ´absolute rubbish´|
|Destro completes Milan move|
|Iraq 2 UAE 3: Khalil´s brace sees off Iraqis|
|Ward-Prowse signs Southampton deal|
|Mandanda: Marseille will turn it around|
|Fuchs backs Schalke goalkeeper Giefer to shine|
|Wenger unlikely to risk Sanchez, could start Gabriel|
|Newcastle would need ´ridiculous´ bid to sell Sissoko|
|Kramer sure of sustained Champions League challenge|
|Sturridge would have steered Liverpool to Wembley - Rodgers|
|South Korea claim underdog status|
|We can handle the pressure, says Postecoglou|
|Cheyrou joins Toronto|
|AFC boss rejects Australia expulsion claims|
|Australia v South Korea: Socceroos eyeing maiden Asian Cup|
|Wolfsburg plan Malanda tribute|
|Blanc: Ibrahimovic, Cavani need to improve partnership|
|NBA´s Kings invest in Sacramento Republic|
|Djukic slams Ronaldo as ´ugly and conceited´|
|Marcelino hails Villarreal´s historic achievement|
|Destro: I want to show Milan are great|
|Copa del Rey Review: Aduriz breaks drought to send Bilbao through|
|Blaszczykowski to miss Leverkusen clash|