Haiti joined Trinidad and Tobago and United States in the CONCACAF Gold Cup quarter-finals after the latter drew 1-1 with Panama in Kansas City.
Michael Bradley saved USA from an embarrassing loss with his goal nine minutes after the break, although the tournament co-hosts hardly covered themselves in glory on Monday.
After copping quite a bit of criticism following their lacklustre win over Haiti on Friday, many expected USA to come out firing at Sporting Park, but it was Panama who started stronger.
Panama – needing a win to be assured of a quarter-finals berth – dominated the first half and deservedly took the lead through Blas Perez after the half-hour mark.
Perez combined with Luis Tejada on the edge of the box and then got clear of his marker to tap in his long-time strike partner’s cutback from six yards for the 39th international goal of his career.
But it would not be enough for Panama in a rematch of the 2013 Gold Cup final, with Bradley getting on the end of Alejandro Bedoya’s cross early in the second half.
The result left Panama (3 points) in third in Group A, with USA (7) finishing first – joined in the last-eight by second-placed Haiti (4).
Panama could still progress but will need to be one of the best-two third-placed teams.
USA made nine changes to the team that only edged past Haiti, with Fabian Johnson, John Brooks, Ventura Alvarado, Timothy Chandler, Kyle Beckerman and Gyasi Zardes all returning.
Chris Wondolowski, Bedoya and Alfredo Morales earned their first starts of the tournament.
Panama made just two changes following their 1-1 draw with Honduras – Valentin Pimentel and Eric Davis brought into the XI for Adolfo Machado and the suspended Luis Henriquez.
With coach Jurgen Klinsmann having switched from a 4-3-3 to a 4-4-2, USA struggled to get forward with any real fluency in the opening 10 minutes, with Panama earning a string of free-kicks in dangerous positions.
In the 10th minute, Tejada beat USA goalkeeper Brad Guzan from six yards from one of those set-pieces only to be correctly flagged for offside.
The next two chances went the home side’s way but Bedoya chose to shoot when a pass might have been better, before Bradley tested Panama keeper Jaime Penedo from 30 yards.
Panama almost hit the front in the 22nd minute but after a corner ricocheted off Bedoya towards goal, Guzan saved impressively, before two follow-up shots were blocked.
With Panama pressing high, USA found it hard to get out of their own half, with Wondolowski and Zardes generally starved of possession, and the Central Americans deservedly hit the front through Perez in the 34th minute.
The hosts had a penalty shout turned down soon after when Bedoya got in behind on a fast break, and although replays indicated Harold Cummings committed a foul, it could have been outside the box.
After bringing on DeAndre Yedlin and Dempsey for Morales and Wondolowski at half-time, USA became more positive and levelled the match in the 55th minute thanks to Bradley.
The game opened up after USA’s equaliser but both keepers remained relatively comfortable, with the best chances for each team arguably falling to Roberto Nurse and Brooks, respectively, although they were unable to direct headers on target.