USA were denied a shock victory over Portugal after Silvestre Varela snatched a late equaliser for the Iberians.
The States, who came into the game hoping to seal a place in the second round, made the worst possible start when a seemingly harmless cross skewed off the shin of Geoff Cameron and into the path of Nani, who calmly put the ball beyond Tim Howard.
Jurgen Klinsmann's charges did respond well after the goal and almost levelled when Clint Dempsey's free kick had Beto beaten, but flew narrowly over the crossbar.
Dempsey went close again moments later when his burst down the right saw the ex-Fulham player bearing down on goal, but his shot from a tight angle was stopped by Beto.
Portugal couldn't keep the Seattle Sounders forward out of the action and he had another chance on 18 minutes when he attempted a deft lob, but saw his effort drift wide.
Dempsey then turned provider for Michael Bradley and, although he scuffed his shot, it was only inches wide of Beto's goal.
Portugal nearly doubled their advantage moments before half time when Nani's shot came back off the post, but Eder failed to convert the rebound as Howard recovered to nudge his effort over the bar.
After the break, the USA could hardly believe that they hadn't equalised when the ball fell to Bradley inside the six-yard box, but Ricardo Costa was on the line to produce a stunning clearance and keep his side ahead.
However, their lead was lost in the 64th minute when they failed to clear a corner and Jermaine Jones's well-taken effort was too much for Beto.
With nine minutes remaining, Klinsmann's men had completed their dramatic turnaround when Graham Zusi's dangerous cross was bundled home by Dempsey off his stomach, to the delight of the sizeable US support in Manaus.
Cristiano Ronaldo had an excellent opportunity to restore parity when he got onto the end of Joao Moutinho's ball into the box, but he dragged his shot wide.
However, with the last attack of the game, Varela headed home Ronaldo's cross to break USA hearts and keep Portugal's World Cup dreams alive.