No team have yet lost their lives in this World Cup’s group of death but Portugal are on life support. After a 4-0 clobbering by Germany in their opening game, manager Paulo Bento had been candid enough to admit that anything less than a victory over the USA would effectively spell the end for his team. In the event, Portugal needed a goal in the final minute of second-half injury time just to avoid another defeat.

Silvestre Varela’s emphatic 95th-minute header did less to help their cause than it did to hurt the Americans, who would already have qualified for the last-16 if they could just have survived those last few seconds. Even so, the USA ought to relish their position. Draw with Germany on Thursday, and both they and their opponents will be through to the knock-out phase.

It is the least Jürgen Klinsmann’s team deserve after a barnstorming start to this tournament. After beating the Ghana team that had eliminated them from each of the past two World Cups, they followed up on Sunday by outplaying a Portugal side that – despite some notable injury problems – still had the Fifa World Player of the Year at its disposal. They did it despite falling a goal behind after just four minutes on a sweltering evening in Manaus.

Both managers had agreed in the build-up to the game that Portugal were not a one-man team. Try telling that to the crowd at the Arena Amazônia, large sections of whom roared with delight every time Cristiano Ronaldo came into possession of the ball.

But it was not the Real Madrid player who opened his nation’s account at this tournament; instead it was a former club teammate. Nani’s indifferent form had been a hot topic of discussion here in Brazil but he found himself in the right place at the right time to capitalise on a horrendous mistake by USA’s Geoff Cameron.

In trying to clear a cross from the left, the centre-back somehow contrived to slice the ball over his own head and into the path of the Manchester United forward. Nani sat Tim Howard down with a shimmy before crashing his shot into the roof of the net.

A worse start for USA would have been hard to imagine. But just as they had retreated into themselves in the wake of Dempsey’s early strike against Ghana, so Portugal seemed to lose their nerve in the face of such early success. Bento’s team withdrew into defensive positions and Klinsmann’s side flooded forward to meet them.

Fabian Johnson led the charge, rushing at the inexperienced André Almeida down USA’s right flank. First the full-back saw a shot blocked behind by Bruno Alves and then he was chopped down by the same defender on the edge of the Portuguese box. Dempsey’s free-kick kissed the roof of the net after barely clearing the crossbar.

USA continued to make inroads. Beto – a late replacement for the injured Rui Patricio in the Portuguese goal – pushed away a near-post effort from Dempsey and then watched helplessly as the same player lifted a chipped shot just over from the ensuing corner. Michael Bradley had a vicious drive charged down, and then fizzed another just wide of the far post from the left.

But it was Portugal who nearly extended their lead on the stroke of half-time, Nani wrong-footing Howard from the edge of the area only to see his shot ping back off the post. The Portuguese was first to the rebound and sent a lofted follow-up goalwards but this time the goalkeeper was equal to it, springing up with startling speed to paw the ball away.

It was a world-class save, and also essential to preserving American hopes in this game. Portugal withdrew Almeida at the interval, sending on William Carvalho in midfield and moving Miguel Veloso out to left-back. If Bento’s intention was to subdue Johnson’s assaults down the right, then he had failed. Only a desperate goal-line block from Ricardo Costa prevented Michael Bradley from equalising after the American full-back had beaten his man and drawn Beto out of position with another brilliant run.

For Portugal this was nothing more than a stay of execution. In the 64th minute USA drew level with a spectacular goal from Jones. Seizing on a half-cleared corner just outside the edge of the D, the midfielder opened his body out on the right before unleashing a violent shot that curled just inside Beto’s left-hand upright.

That was just the beginning. With nine minutes remaining Dempsey arrived to bundle a Graham Zusi cross over the goal-line. The whole team celebrated with abandon. Portugal had not threatened since the equaliser. Up in the stands, the USA’s considerable following began to dream of taking their place in the next round.

Varela’s goal came as a bucket of cold water. It was a beautiful piece of football, the previously subdued Ronaldo reminding us what he is capable of with a sumptuous ball from the right which Varela planted past Howard, who would later be named man of the match.

“We had one foot in the door, so there’s a small bit of disappointment,” said the goalkeeper afterwards, “but realistically we’ve still got a really good chance to progress. We’re right where we wanted to be in this process. We wanted to be in with a chance at this stage and we’re in with a chance.”

A very good one, at that. USA have earned the right to look with confidence towards their final group game against Germany. Meanwhile, the grim reaper hovers by Portugal’s door.

TV ratings for soccer are up, fans are packing the bars, and Jürgen Klinsmann's team is on the verge of qualification from Group G. Is the US finally ready to embrace the global game? Tom Dart reports from Houston