The U.S. men's basketball team loses the championship game to Brazil, but U.S. leads medalists with total of 296.
Two Cuban weightlifting gold medalists and two Mexican baseball players tested positive for banned substances at the Pan American Games.
Games officials said Sunday that William Vargas, winner in the 136.4-pound weightlifting class, and Rolando Delgado, the 152-pound class winner, tested positive for the anabolic steroid Nandrolone. Baseball players Roberto Vizcarra and Hector Alvarez also tested positive for Nandrolone.
Seven athletes tested positive for drugs at these Games, which concluded Sunday night with a celebratory Closing Ceremony.
"The biggest problem in Olympic sports is drugs," Pan American Sports Organization president Mario Vazquez Rana said.
Brazil handed the United States its worst loss in men's basketball, winning 95-78 to claim the gold medal. The Brazilians shot 60 percent in the first half to take control. They went inside to 6-foot-10 A.J. Santos to hold off the charging Americans in the second half.
"We're disappointed, but Brazil just played a better game," guard Damon Bailey said of the collection of CBA All-Stars who were together for about a month.
The final medals count showed the United States with 296 (106 gold, 110 silver, 80 bronze), followed by Canada with 196 (64-52-80) and Cuba with 156 (69-40-47).
With Vargas stripped of his gold medal, Barrio Hernandez of Colombia moved up from second place for the gold. The silver medal goes to Jiminez Lopez of Guatemala and the bronze to Legrand Sakamaki of the United States.
Replacing Delgado is Jonny Gonzalez of Colombia, followed by Barbosa Morales, also of Colombia, and Alexis Batista of Panama.
Mexico finished fourth in the baseball tournament.
Despite the seven positive tests, Vazquez Rana called this year's Pan Am competition "very clean games."
Between 850 and 1,000 drug samples were taken, and the percentage of positives was minimal.
Eduardo de Rose, head of the Pan American medical commission, said no games ever tested so many athletes. He called the number of positive cases "below average the number we've had at any international games."