The frontside Jose Fajardo He scored the decisive goal in the 83rd minute of this Group C second round match in front of almost 60,000 spectators at the Mercedes-Benz Stadium in Atlanta, firing substitute Ethan Horvath from Abdiel Ayarza's cross. Tim Turner, the Americans' starter, was injured.
Folarin Balogun had put the local side ahead in the 22nd minute with his second goal of the tournament, an unstoppable left-footed shot, and César Blackman levelled in the 26th minute.
After beating Bolivia 2-0 in their debut, the United States found themselves in trouble this time with the early expulsion of Tim Weah, in the 16th, for a childish attack on Roderick Miller. Panama also finished with ten men to one red card for Adalberto Carrasquilla in '88.
The hosts will have to play all of Monday against Uruguay, who faced Bolivia in the second hour on Thursday in search of a second victory that will leave the country at the gates of the next round.
Panama, in turn, will clash with Bolivia in the final phase of the tournament, also on Monday, with the possibility of advancing to the quarter-finals.
Pending the result of Marcelo Bielsa's team, Uruguay, the United States and Panama each have three points. Bolivia has not added.
The United States got off to a promising start when Weston McKennie sent the ball into the net with a powerful shot in the 5th minute, but the move was canceled by teammate Timothy Ream's earlier offside.
Then, in a thrilling match with strong legs, Weah lost control and swung at Miller. Salvadoran referee Ivan Barton initially showed him a yellow card, but the VAR call changed the colour of the card to red.
With all that, Balogún took an extraordinary left-footed shot that opened the scoring after hitting a post and going into the goal.
Panama, as in the entire duel, did not bow its head.
Almost immediately, a shot from Blackman leveled the score at 1-1 and revived the Panamanian team, who had lost 3-1 to Uruguay in their first outing.
At halftime there was bad news for the locals: a collision with an opponent knocked out goalkeeper Turner, who was replaced by Horvarth.
Panama immediately tested Horvarth, with a whip from Edgardo Fariña forcing the North American to stretch to avoid the fall of his goal.
The United States, in turn, was dangerous, despite having one less player on the field.
In the final phase he had a golden opportunity: Pepi missed a header on his own after a brilliant move by Weston McKennie. Goalkeeper Orlando Mosquera saved the ball.
Fajardo did not forgive two minutes later and took advantage of a good service from Ayarza. Both had come into the Panamanian team as substitutes.
The red card for Carrasquilla caused excitement towards the end, but Panama maintained its lead and are in a good position to surprise and join the top eight teams in this Copa América.