(CNN) -- This time it was the United States that gave up the dramatic goal.
Portugal's Silvestre Varela scored on a strong headed goal deep, deep in stoppage time to give Portugal a desperate 2-2 draw with the United States in a key Group G World Cup match at Manaus, Brazil.
World Cup: The best photos from June 22
The goal, in the 95th minute, came off a cross from Cristiano Ronaldo, who showed no signs of a knee injury that was the subject of much media attention in the buildup to the contest.
Second half strikes by U.S. midfielder Jermaine Jones and striker Clint Dempsey had given the United States a 2-1 lead until Portugal rescued its World Cup chances.
With a draw, the two teams are still in position to qualify for the knockout round, though the United States, with four points, is in much better shape than Portugal (one point), which must beat Ghana (one point) on Thursday and do so decisively.
Ghana could move on if it wins by several goals and either the United States or Germany loses.
The American goals made up for an early U.S. miscue that allowed Portugal to take a 1-0 lead when Nani scored after a U.S clearance attempt went awry.
U.S. defender Geoff Cameron tried to knock away a cross but the ball went to a wide-open Nani, who waited for U.S. goalkeeper Tim Howard to go down, then slammed home a shot from 6 yards.
Dempsey scored when midfielder Graham Zusi sent a ball toward goal that the U.S. star redirected into the open net.
Portugal, the fourth-ranked team in the world and one of the pre-tournament favorites in Group G, had the possession edge but couldn't muster another shot after the goal until Ronaldo forced Howard to save his long-distance effort.
Ronaldo, who had a week filled with concerns over the tendinitis in his left knee, was quick and showed flashes of the brilliance that made him world player of the year in 2013. He had several good scoring chances himself but nothing that gave Howard, his former teammate when they played at Manchester United, much to worry over.
Howard had four saves, including an outstanding two-stop sequence on a Nani shot in the first half that he turned off the post and a rebound that he punched away while reaching over his head.
The Portuguese team was missing several key players Sunday. Portugal was missing defender Pepe through a red card suspension and striker Hugo Almeida and defender Fabio Coentrao, who were injured.
Dempsey was playing with a broken nose that he said made it hard to breathe in the Americans' 2-1 dramatic win over Ghana. After the match he said he made it through Sunday's contest without problems.
The United States was missing striker Jozy Altidore, who has a strained left hamstring. Dempsey, normally a midfielder, moved to the top of the U.S. formation in Altidore's place while Zusi slid into the starting lineup.
The game was played in the heat and humidity of the Amazon rainforest. The heat index was 93 degrees at kickoff and the weather seemed to have an effect on the pace of the game as the match moved into the second 45 minutes.
That half was played at a much more measured pace until after the U.S. goals, when Portugal needed a score to keep from being eliminated from the tournament.
The Americans, 13th in the FIFA rankings, were cheered on by about 20,000 red, white and blue fans at Arena Amazonia.
The U.S. and Portugal are the final two of the 32 teams to play their second match. Monday features four matches, two in Group A and two in Group B, as several teams battle for spots and seedings in the next round while others that have been eliminated let some reserves get in a World Cup match.