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'
|Viviani makes surprise Verona switch|
|Estonian team wins cup match 31-0|
|No meeting with Arsenal has occurred - Vidal´s agent|
|United States 2 Germany 0: Ellis´ team reach World Cup final|
|Argentina 6 Paraguay 1: Messi leads Martino´s men to Copa final|
|UEFA Europa League Review: FK Zeljeznicar and FC Dacia Chisinau open with wins|
|UEFA Champions League Review: FC Pyunik make winning start|
|Sweden U21 0 Portugal U21 0 (aet, 4-3 on penalties): Carlgren the hero as Swedes claim Euro glory|
|Frankfurt capture Castaignos|
|Bastia face relegation over debt|
|Bahlouli makes Monaco switch|
|Pearson sacked by Leicester|
|Rekik set for Marseille switch|
|Ranocchia and Carrizo sign new Inter deals|
|Crespo handed Modena role|
|Cech reveals work permit prevented past Arsenal move|
|Ivory Coast cut coaching shortlist down to five|
|McCarthy satisfied with Mings sale|
|Heaton commits to Burnley|
|Bowyer: Rhodes and Gestede will not come cheap|
|Burton and Day depart West Brom|
|Mendilibar makes Eibar return|
|Milan agree to terminate Muntari contract|
|Copa final a dream come true for Sampaoli|
|CSKA Sofia demoted due to financial crisis|
|Wolfsburg warn off De Bruyne suitors|
|Kone: I want to prove I can cut it at Everton|
|West Ham v Lusitans: Bilic set for first game in charge|
|Millennium Stadium to host 2017 UEFA Champions League final|
|Ronaldo a ´possibility´ for Portugal´s Olympics squad|
|Liverpool should get rid of Sterling - Grobbelaar|
|Miranda arrives for Inter medical|
|Arsenal can challenge the best - Cech|
|Real star Bale can be better than Ronaldo, says Keegan|
|UEFA approves changes to FFP rules|
|Honduras v Mexico: Moreno´s injury may force Mexican rethink pre-Gold Cup|
|Hiddink was the wrong man for Netherlands - De Boer|
|Vargas: I was scoring with every shot at training|
|Zambrano red rocked Peru - Gareca|
|Paraguay to change tack against Argentina|
|Sampaoli thrilled with substitutes´ influence, applauds Peru|
|Martino rues Copa America date with former side Paraguay|
|Former Birmingham City player Thwaites among Tunisia victims|
|Chile 2 Peru 1: Zambrano´s red card helps hosts into Copa final|
|Thiago Silva: ´I didn´t even know the ball had hit my hand´|
|Ronaldinho set to sign for Antalyaspor|
|Jara ban reduced on appeal by one match|
|Hiddink leaves Netherlands post|
|Cresswell pens new five-year deal at West Ham|
|Koeman: No serious United bid for Schneiderlin|
|Barbados eliminated from World Cup qualifying after fielding ineligible player|
|Former Catania president admits buying matches|
|Jones agrees Manchester United deal|
|Argentina v Paraguay: Valdez hoping not to need another comeback|
|Milan seal Bertolacci signing|
|Cech grateful to Abramovich and Chelsea fans|
|UEFA Champions League Preview: Brotherly pride at stake as B36 play TNS|
|UEFA Europa League Preview: Tommasi set to aid La Fiorita qualifying bid|
|Cech leaves Chelsea to join Arsenal|
|Paulinho ends Spurs frustration with Guangzhou move|
|Sampdoria confirm Eto´o exit amid Antalyaspor talk|
|Garcia departs Espanyol ahead of expected Qatar move|
|Watford to delay Doyley decision|
|Schlupp agrees new Leicester deal|
|Schweinsteiger hints at Bayern stay amid United links|
|Bertolacci thrilled ahead of Milan move|
|Langerak leaves Dortmund for Stuttgart|
|Muniain extends Athletic contract|
|Youngsters to get chance on US tour - Van Gaal|
|La Liga chief hits out at Real Madrid over TV rights opposition|
|Villa confirm Wilkins as assistant manager|
|Dicks joins West Ham coaching staff|
|Heldt enters to jeers, exits to cheers|
|Paraguay pride has grown at Copa America - Aguilar|
|Van Gaal tight-lipped on De Gea|
|Bacca confirms Milan agreement|
|Weight of expectation on hosts Chile to benefit Peru - Gareca|
|MLS Review: Timbers thump Sounders thanks to Adi´s double|
|Dzeko ´would run to Roma´ - Pjanic|
|Peru won´t sit back - Sampaoli|
|Zenga: Cassano, Balotelli will not be joining Sampdoria|
|Victory to start A-League defence away to Adelaide|
|I want to play MLS ´at the peak of my career´ - Johannsson|
|Allegri: I like Isco and Oscar|