Michael Orozco, center, of the U.S. celebrates with teammates after scoring a goal against Panama during their 2014 World Cup qualifying soccer match in Panama City. REUTERS/ Carlos Jasso

In a wild finish Tuesday, the U.S. eliminated Panama’s chances of going to the 2014 World Cup with a 3-2 victory in Panama City while keeping alive Mexico’s hopes.

Down 2-1, the Americans scored twice, the first coming from Graham Zusi in the second minute of stoppage time. Aron Johannsson, a 22-year-old playing in only his fourth game with the national team, provided the game-winner a minute later.

Had the U.S. lost to Panama, Mexico, who lost to Costa Rica 2-1, would have missed its first World Cup since 1982.

“It shows you how brutal football can be. For one side that’s almost there, and then the other side is back in,” U.S. coach Jurgen Klinsmann said (via the Associated Press.) “Now obviously you feel for the people. You feel for an entire country.”

It was Panama who struck first, with Gabriel Torres scoring in the 18th minute. American Michael Orozco tied the game in the 64th minute before Panama’s Luis Tejada helped his team move into World Cup playoff berth position with a score in the 83rd minute.

But the lead was short lived as the heroics by Zusi and Johannsson put away Panama, who finishes fifth in the CONCACAF standings.

The Americans had already clinched their World Cup berth last month and mostly used a secondary lineup against Panama. Among those not playing either because of injuries or decisions to return to their clubs were Landon Donovan, Clint Dempsey, Michael Bradley, Jermaine Jones, Tim Howard, Omar Gonzalez and Matt Besler.

Final CONCACAF standings (via fifa.com):

1. USA (22 pts. Qualified)
2. Costa Rica (18 pts. Qualified)
3. Honduras (15 pts. Qualified)
4. Mexico (11 pts. Play-off with New Zealand)
5. Panama (8 pts. Eliminated)
6. Jamaica (5 pts. Eliminated)

Next for the USA (via Steven Goff):

Nov. 15: friendly at Scotland in Glasgow, 3 p.m. ET (ESPN2, UniMas, WatchESPN)
Nov. 19: friendly at Austria in Vienna, 2:45 p.m. (NBC Sports Network)
Dec. 6: World Cup draw in Bahia state, Brazil.