Cristiano Ronaldo scored his first goal of the World Cup but crucially wasted several other good chances in Portugal's 2-1 win over a haphazard Ghana on Thursday that sent both sides home.
The Portuguese finished level on four points with the United States in Group G but the Americans advanced to the last 16 courtesy of a better goal difference despite their 1-0 loss to group winners Germany in Recife.
The World Player of the Year could have changed that had he converted three great chances which would have sent the Europeans through at the expense of the U.S. on goals scored.
All he could manage, though, was an 80th minute strike - his 50th goal for his country - after Ghana goalkeeper Fatawu Dauda flapped at a high ball and directed it straight to the grateful Real Madrid forward.
"We created a lot of chances we didn't convert all of them, we needed three goals and we were depending on the Germany result. It wasn't possible," Ronaldo told reporters.
"We knew it was complicated, that's football, we leave with our heads held high, we tried out best and we didn't succeed."
The Portuguese skipper, who also hit the crossbar in the first half with a cross shot, cut a frustrated figure throughout the match at the Brasilia national stadium and again appeared shorn of full fitness amid concerns about long term knee woes.
He should have opened the scoring in the 19th minute but his close range header was well parried by Dauda, with the keeper also repelling a long range free-kick from the Real Madrid man seven minutes earlier.
Dauda, though, was left to helplessly pick the ball out of his own net when team mate John Boye skewed a clearance in off the crossbar in the 31st minute of a game lacking quality despite both teams still chasing a place in the last 16.
The goal came after a Ghana break was ended by Bahrain official Nawaf Shukralla accidentally blocking an attempted pass, handing possession to the Portuguese who went up field and scored.
The messy opener followed Ghana's ragged preparations for the game, with a row over World Cup appearance fees only resolved on the eve of the match after money was sent by the country's president. However, more problems surfaced hours before kick-off when midfielders Kevin-Prince Boateng and Sulley Muntari were sent home for ill-discipline.
The industrious team refused to fold, though, and were deservedly back on level terms in the 57th minute after striker Asamoah Gyan headed home at the back post following a brilliant cross with the outside of his foot by Kwadwo Asamoah.
It was Gyan's sixth World Cup goal and he is now the highest-scoring African in finals history, surpassing the five scored by Cameroon's Roger Milla.
Gyan then turned provider, putting in another ball from the left for an unmarked Abdul Majeed Waris moments later but the striker could only steer his header wide from six yards out.
A 2-1 victory for Ghana, who reached the quarter-finals four years ago, would have sent them through to the second round but Waris' profligacy was punished by Ronaldo with 10 minutes remaining to knock the wind out of the Africans.
Ronaldo, lacking the usual mazy runs and skilful flicks and tricks, should have added another minutes later but Dauda was on hand to parry the forward's side footed effort from close range.
The keeper also blocking an effort from the skipper in the dying stages as the Portuguese poured forward in their fruitless search for goals against the beaten Africans.
"We are very disappointed. We have to go home and come back stronger," Gyan said after they finished bottom of the group with one point.