Until Varela's diving header from Cristiano Ronaldo's cross from the right, Portugal looked dead and buried after the U.S. had come from behind to lead 2-1.

The result left Germany and the U.S. level at the top of the group on four points and Portugal and Ghana on one.

The opening Portugal goal came in the fifth minute after a mistake by Geoff Cameron saw the ball fall kindly to Nani who smashed it high into the net past a helpless Tim Howard.

Jermaine Jones equalised in the second half with a blistering right-foot shot from outside the area and Clint Dempsey put the Americans ahead after bundling the ball home from close range in the 81st minute.

USA v Portugal - player ratings

USA v Portugal - player ratings

1/22
Tim Howard: 7

His part in Nani's goal was questionable, but made amends with a wonderful recovery save to deny Eder.

GETTY

2/22
Fabian Johnson: 7

A real threat going forward as the USA continually targeted the right flank.

GETTY

3/22
Matt Besler: 7

Showed real guts to continue when injured, and made some key interceptions.

GETTY

4/22
Geoff Cameron: 5

Looked nervous in uncustomary central position, and was at fault for the game's opening goal.

GETTY Caption:US defender Geoff Cameron (L) vies with Portugal's forward Eder (R) during a Group G football match between USA and Portugal at the Amazonia Arena in Manaus during the 2014 FIFA World Cup on June 22, 2014. AFP PHOTO / ODD ANDERSEN (Photo cre

5/22
DaMarcus Beasley: 6

Expected a tough night against Portugal's attacking flair, but used his nous to keep them quiet for long periods.

GETTY

6/22
Kyle Beckerman: 6

Steady without being spectacular in midfield.

GETTY

7/22
Michael Bradley: 5

A night to forget for the experienced midfielder, who missed a sitter and then gave the ball away in the build-up to Varela's late equaliser.

GETTY

8/22
Jermaine Jones: 8

Tackled well in midfield, and his willingness to have a go from distance was eventually rewarded with a tremendous equaliser.

GETTY

9/22
Graham Zusi: 6

Came in on the left-hand side, and performed admirably.

GETTY

10/22
Alejandro Bedoya: 6

Nantes man played his part in the midfield battle before eventually being subbed

GETTY

11/22
Clint Dempsey: 8

The captain was everywhere in the first half, and, while he tired significantly, in the second, still managed to pop up with what looked like the winner.

GETTY

12/22
Beto: 7

Stand-in goalkeeper was helpless to two US goals, but made some standard saves when called upon.

GETTY

13/22
Joao Pereira: 6

The Valencia full-back performed his role without drama.

GETTY

14/22
Ricardo Costa: 7

The pick of the Portugal defenders, who cleared brilliantly off the line to keep out Bradley's shot.

GETTY

15/22
Bruno Alves: 5

Selected despite struggling with injury and was culpable of a lazy clearance before America's second goal.

GETTY

16/22
Andre Almeida: 5

Endured a difficult 45 minutes at left-back before being substituted.

GETTY

17/22
Miguel Veloso: 7

Classy midfielder was at the heart of much of Portugal's best play.

GETTY

18/22
Joao Moutinho: 6

Kept possession well, but was often unable to find Nani or Ronaldo with killer balls.

GETTY

19/22
Raul Meireles: 5

Spent most of his time on the deck, and had little impact before his removal.

GETTY

20/22
Luis Nani: 7

Bagged an early opener, and was a few inches of woodwork away from adding a second before half-time.

GETTY

21/22
Cristiano Ronaldo: 6

With a whole country's expectation upon him, he again faltered, but still delivered a wonderful cross just when they needed him most.

GETTY

22/22
Helder Postiga: 4

The curse of Portugal's strikers struck again as he departed injured inside 16 minutes.