The Americans squandered several great chances during the run of play and netted only via the penalty spot (Landon Donovan) and on a corner kick (Carlos Bocanegra).
At 2-0 in the 82nd minute and Panama down to 10 men, Clint Dempsey -- perhaps gassed - botched a one-v-one opportunity by dawdling on the ball.
Panama scored three minutes later when three Americans couldn't stop Blas Perez from rifling a loose ball past Tim Howard, whose excellent save on a Perez breakthrough in the 48th minute had preserved a 0-0 scoreline.
Coach Bob Bradley, who had replaced Dempsey with Brian Ching just before Panama scored, used Ricardo Clark for Donovan as his final sub to help kill off the final minutes.
There were some bright spots for the Americans. Oguchi Onyewu, while still prone to lapses of concentration, kept his head in the game despite a yellow card. Pablo Mastroeni timed his tackles well, seldom gave the ball away, and like Onyewu didn't let chronic Panamanian fouling, elbowing, arguing and playacting upset him.
Bocanegra headed an excellent goal and won his duels in the air defensively, but miscommunication in the back and a lack of midfield pressure allowed Ricardo Phillips to play a pair of dangerous balls for Perez.
Donovan produced many menacing moments while playing a rather free role in support of ex-Revolution teammates Dempsey and Taylor Twellman. Michael Bradley and Mastroeni buttressed the central midfield, and Beasley roamed the left, seeing less of the ball than had been the case in a 4-0 rout of El Salvador Tuesday in the Group B finale.
When he did the ball with space to run with it, Beasley sowed panic in the Panama defense. His dribble and through ball provided Donovan with a clear run at goal that forced one of keeper Jaime Penedo's several excellent saves.
Frankie Hedjuk's speed and experience earned him the start at right back, and his frenetic energy and relentless spirit unsettled the Panamanians. His pace took him into a few threatening situations but his poorly hit crosses didn't provide shooting opportunities. He ran down opponents and loose balls, shanked a rare shooting chance, and picked up a card. Left back Jonathan Bornstein was beaten a couple of times early in the match but for the most part kept his corner secure.
Bad shooting and bad luck thwarted Taylor Twellman, who failed to test the keeper with four first-half shots. He dragged one shot wide with his left foot, missed by yards with his right foot when set up perfectly, and headed a tougher chance on a corner kick off the top of the crossbar. Yet another effort struck Dempsey in an offside position; it was payback of sorts, since one of Twellman's misses came on a ball Dempsey nodded right where it should have been.
Donovan failed to put away chances twice in the first half, but in both cases, Donovan's boldness and speed took him clear of the defenders and only Penedo's bravery and quickness denied him. On the second attempt, Donovan outpaced the defense and cut left as Penedo advanced, yet the keeper kept his feet moving and narrowed the angle until he deflected Donovan's raking shot over the crossbar.
Howard's stop of Perez blunted Panama's energetic start to the second half and allowed the U.S. to regain its rhythm. Twelve minutes later, Dempsey played a great ball over the top for Donovan as he raced past Carlos Rivera, who wrestled Donovan to the ground in desperation.
Donovan put the penalty to Jaime Penedo's left as the keeper stumbled to the right. Two minutes later, Beasley's inswinging corner kick swerved perfectly for Bocanegra, who had escaped Perez's marking with a subtle hand check, to head past Penedo.
From the balance of play, the Americans deserved their two-goal lead, though Panama had failed to exploit a pair of decent situations early in the match. It started the game reasonably well, considering it had lost three starters to suspension in the Group C finale, a 1-0 loss to Mexico, and should have punished the wasteful USA early in the second half when Perez broke clear.
Referee Neil Brizan and his assistants didn't cover themselves in glory. After cautioning Panamanian captain Felipe Baloy in the 18th minute, Brizan failed to notice - or simply ignored - Baloy slapping the ball to halt a dangerous U.S. counter. Also momentarily blind were referee's assistant Hector Delgadillo and fourth official Jose Pineda, both of whom were stationed at midfield, where the offense occurred. Inexplicable.
Brizan cautioned eight players and sent off Manuel Torres for a second offense in the 76th minute. Panama's bold offensive play earned respect at this tournament but its cantankerous, combative behavior in this match and the loss to Mexico soured the sweetness of its attack.
Bradley can be pleased with much of his team's play -- it moved the ball crisply upfield and until near the end changed gears efficiently - but more ruthless opponents will exploit those defensive gaffes and won't concede nearly as many chances.
June 16 in Foxborough, Mass.
USA 2 Panama 1
Goals: Donovan (pen.) 60, Bocanegra (Beasley) 62; Perez 85.
USA - Howard, Hejduk, Onyewu, Bocanegra, Bornstein, Bradley, Mastroeni, Donovan (Clark, 89), Beasley, Twellman (Ralston, 71), Dempsey (Ching, 84)
PANAMA - Penedo, Rivera, Moreno, B.Perez, J. Perez, Torres, 15- Phillips, Mitre (Munoz, 63), Henriquez (Blanco, 78), Herrera (Henriquez, 78), Baloy.
Corner Kicks: 5-1
Yellow cards: USA - Hejduk 28, Onyewu 35 Beasley 87, Howard 90; Panama - Torres 16, Baloy 18, B Perez 22. J. Perez 49, Torres 76, Munoz 89.
Red card: Panama - Torres 76.
Referee: Neil Brizan (TRI)