CHESTER, Pennsylvania (AP) Backup goalkeeper Luis Mejia saved two penalties in the shootout as an inspired Panama team ended a trying week with a medal at the Gold Cup, beating the United States in the third-place game Saturday.

Panama won the shootout 3-2 after extra time ended with the score 1-1. Mejia saved DaMarcus Beasley's shot in the fifth round in what might have been the veteran defender's last game for the U.S.

Panama was on the verge of beating Mexico in Wednesday's semifinals despite being down to 10 men but was called for a disputed hand ball in the area. Mexico converted the penalty in stoppage time, then scored on another penalty in extra time for the 2-1 win.

More from FoxSports

The Panamanian federation's president later alleged the match was fixed, and players were seen arriving at PPL Park in suburban Philadelphia on Saturday wearing T-shirts that read, ''Dignity isn't bought.''

It was another shaky performance by the Americans, who were stunned by Jamaica in the semifinals and had their worst Gold Cup finish since losing to Colombia in a shootout in the 2000 quarterfinals.

Panama was missing several key players because of injury or suspension, including its top goalkeeper. But it dominated play against a sluggish U.S. team, with 11 shots on goal to the Americans' two in regulation.