MANAUS, BRAZIL – If the heat and humidity at Arena Amazonia wasn’t draining enough for the United States men’s soccer team Sunday night, then surrendering the equalizing goal so late into stoppage time did the trick.

Only seconds from securing a spot in the round of 16, the Americans allowed a header by Silvestre Varela five minutes into added time — set up by a beautiful pass by Cristiano Ronaldo — to lift Portugal into a dramatic 2-2 draw in the Group G encounter.

“Too long. Thirty seconds too long,” U.S. goalkeeper Tim Howard said.

Actually, it was 39 seconds before referee Nestor Pitana whistled the match over after the Americans kicked off.

This U.S. team will not be the first to advance to the knockout segment after just two group stage games. It will not get to skate in its final Group G game, against Germany. It will not get to relax.

Their only consolation was that they still have another chance. The Americans (1-0-1, four points) need a win or a tie with Germany (1-0-1, four) in Recife on Thursday to clinch a spot in the knockout round. Portugal (0-1-1, one), which kept its slim hopes alive, will meet Ghana (0-1-1, one) on Thursday.

Team USA can also move on with a loss as long as it has a better goal differential if the Ghana and Portugal match has a winner.

“We had one foot in the door, but there’s a small bit of disappointment,” Howard said. “We gave ourselves every chance to advance. We wanted to go into the last game with a chance and we do.”

The match had plenty of twists. Portugal grabbed a fifth-minute advantage on a blunder by U.S. center back Geoff Cameron that was converted into a goal by Nani. The Americans rallied with second-half goals by Jermaine Jones and Clint Demspey, who pushed home an 81st-minute equalizer with his stomach.

Deep into added time, Ronaldo — who had largely been neutralized by a crowded midfield strategy that U.S. coach Jurgen Klinsmann orchestrated and his players executed — finally found a bit of space. Bradley lost the ball in the middle of the field, and Ronaldo seized upon the opening, swinging in a perfect cross that Varela barreled past Howard with a powerful header, stunning the United States and giving Portugal a lifeline.

“It’s a bummer for a moment that you have to swallow,” Klinsmann said. “These finishes are very emotional for all of us, for the fans, the players and the bench. This is what the World Cup is about. You have to cross it off and move on ... We’re going into Recife very ambitious, with a lot of confidence.”

The Americans started off giving Portugal a gift goal on a horrendous clearance by Cameron in the fifth minute. The ball went to the right to an unmarked Nani, who easily scored from 6 yards.

The USA fought back, pulling even at 1-1 on Jones’ 26-yard blast after Portugal could not clear Graham Zusi’s corner kick in the 64th minute.

“After a difficult start, the response and the commitment and the effort was incredible,” Bradley said. “Difficult conditions and still we found a way to push through.”

After the Portugal defense blocked shots by Zusi and Bradley, Dempsey found the rebound and pushed the ball into the net for a 2-1 United States lead in the 81st minute.

“I just tried to stay onside and when the ball came across, just put it on my chest,” Dempsey said. “I was happy that the linesman kept his flag down.”

The conditions were staggering, the Amazonian climate suffocating. Temperatures were in the high 80s, and humidity levels nearly 70 percent, making it feel as if the entire game were being played in a bathroom where the shower had been left on.

Even through it all, The Americans felt victory had been theirs. Then, suddenly, it was gone.

“We could all taste it,” defender Matt Besler said. “We could all taste the second round.”

Then he shrugged. “I think we like to do things the hard way,” he said. “It’s the American way.”