Portuguese substitute Silvestre Varela grabbed a dramatic stoppage-time equaliser to secure a 2-all draw with the United States in their World Cup Group G game in Manaus.
Just as it looked as though the Americans had secured a come-from-behind victory to qualify for the second round, Varela scored with a flying header from a Cristiano Ronaldo cross.
Clint Dempsey had given the United States the lead in the 81st minute, steering the ball home with his stomach from close range.
The result means the U.S. are in second place, level with Germany on four points, and Portugal are third with one and face a tough task to make the next round.
In the final round matches Germany play the USA and Ghana play Portugal.