Panama scored a stunning 2-1 upset win over the United States on Saturday to advance to the Gold Cup quarterfinals.

Luis Tejada scored in the 19th minute and Gabriel Gomez converted a penalty kick later in the first half to help lift Panama to its first win in nine matches against the United States.

Clarence Goodson's second-half strike reduced the margin, but it wasn't enough to save the Americans from their first defeat ever in the group stage of the Gold Cup.

Despite the loss, the U.S. can clinch a spot in the quarterfinals by beating Guadeloupe in its final Group C match Tuesday night in Kansas City.

Tejada tapped home a rebound after a lunging U.S. goalkeeper Tim Howard blocked Armando Cooper's goal-bound header.

American Tim Ream's foul set up Gomez' penalty kick, which the Panamanian lifted over the diving Howard for a 2-0 lead in the 36th minute.

Goodson gave the U.S. hope for a dramatic comeback, scoring in the 68th minute. The Americans had a couple of opportunities to equalize, but

Chris Wondolowski missed in the 80th minute and Jaime Penedo made two saves in injury time to help Panama hang on.

The loss was just the second for the Americans in their past 21 Gold Cup games. They had previously had six wins and two draws against Panama, with all the meetings coming in either Gold Cup or World Cup qualifying.

The teams played a scoreless draw in the 2005 final, with the U.S. winning a penalty shootout to take the championship. They met in the quarterfinals in 2007 and 2009, with Panama losing 2-1 each time.

Panama opened the tournament with a 3-2 victory over Guadeloupe and beating the Americans gave it consecutive Gold Cup wins for the first time.

The U.S. began its campaign with a 2-0 win over Canada.