Bobby Wood scored after a goalmouth scramble in the 85th minute, and the United States escaped from Honduras with a 1-1 draw on Tuesday after nearly falling into a deep hole in World Cup qualifying.
Romell Quioto scored in the 27th minute after defender Omar Gonzalez failed to clear the ball with a slide tackle. Quioto was left with an open 11-yard shot that beat goalkeeper Brad Guzan to the far post, causing exuberant fans to stomp and shake Estadio Olimpico Metropolitano.
Christian Pulisic was fouled about 30 yards from the goal and Kellyn Acosta took the free kick. Goalkeeper Luis Lopez batted the ball with his left hand off the post and Matt Besler hooked it to Jordan Morris.
The Seattle Sounders forward sent a backward header to Wood, a 73rd-minute substitute, who chested the ball and scored his ninth international goal, avoiding a huge U.S. embarrassment and deflating fans who had been celebrating since the start.
And the Americans next opponent Panama took advantage of the draw by beating Trinidad & Tobago 3-0 at home to leapfrog the U.S. into third spot in the standings.
Gabriel Torres scored a spectacular goal from a full-field run, beating two defenders and outracing everyone to the ball before beating Marvin Phillip in the T&T goal to send the crowd into a frenzy.
The hosts were gifted a second goal from Carlyle Mitchell, who headed a curling cross from Panama's right flank into the back of his own net to make it 2-0.
And with the rains falling in Panama City, Abdiel Arroyo netted his team's third after cutting in from the left side and powering a right-footed shot past Phillip.
The U.S. hosts Panama in Orlando, Florida, on Oct. 6 in a must-win match if the U.S. wants to keep hopes of an automatic qualifying spot alive.
Already qualified Mexico managed a 1-1 draw against Costa Rica to keep the Ticos out of a guaranteed spot in Russia for now.
El Tri got on the scoreboard just before half-time when Cristian Gamboa redirected the ball into his own net after Keylor Navas had come up with an amazing save to keep the ball out of the goal seconds earlier.
Real Madrid goalkeeper Navas denied Mexico twice more in the second half, punching away a Jesus Corona shot before diving to keep out Hirving Lozano on what looked to be a sure goal.
With Mexico looking to hang on, Marcos Urena scored an unbelievable goal to level matters after timing the bounce from a headed Rodney Wallace perfectly and lashing a sideways volley past Guillermo Ochoa.
Costa Rica faces Honduras and Panama in its remaining qualifiers and Mexico will play Trinidad before wrapping up their Hex campaign against Honduras.
Information from the Associated Press was used in this story.