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.
Degenek not taking his foot off the gas
Twelve months ago, Caltex Socceroos defender Milos Degenek was playing in Japan — now, he’s tearing up Serbia’s SuperLiga, having been named in the league’s best eleven for the first half of the season. It’s a credit to Degenek, 24, who signed with Red Star Belgrade in July
Degenek named in Serbian Superliga's best XI
Caltex Socceroos defender Milos Degenek has been named in the Serbian Superliga’s best eleven players of the first half of the season after his performances for Red Star Belgrade. AUSSIES ABROAD: Sainsbury denies former club Inter in first UCL start READ MORE: Where you can w
FFA to conduct additional injury assessment with Aaron Mooy
Football Federation Australia (FFA) acknowledges Huddersfield Town’s statement regarding Aaron Mooy released on Thursday morning (AEDT). Due to the significance of the AFC Asian Cup to the Caltex Socceroos, FFA will proceed with a plan to deploy its High Performance Coordina
Aussies Abroad: Rogic and Vukovic progress to Europa League Round of 32
The Europa League Round of 32 will have an Aussie flavour after Tom Rogic and Danny Vukovic both sealed their progression to the knockout stage of Europe’s second-tier competition. Rogic played 90 minutes as Celtic did it the hard way, their 2-1 loss at the hands of FC Salzbur