Mexico edged out Bolivia in their final warm-up game before heading to the World Cup.
Half-time substitute Juan Francisco Palencia scored the only goal of the game in the 47th minute before a crowd of 37,217 at Candlestick Park.
Cuauhtemoc Blanco passed down the left to Palencia, who sliced between two defenders and beat Bolivian goalkeeper Carlos Eguez.
Eight minutes later, Blanco had a chance to double Mexico's advantage, striking through a crowded penalty area.
The ball bobbled but Eguez managed to control it.
Bolivia's best chance came in the 16th minute when Augusto Andaveris had a "goal" disallowed after he was ruled offside.
Another chance came with eight minutes remaining when Ruben Tufino, who played at the University of South Carolina, fired a 36-meter free-kick wide of the Mexican goal.
Mexico: Oscar Perez, Rafael Garcia, Rafael Marquez, Manuel Vidrio, Gerardo Torrado, Jared Borguetti, Braulio Luna, Luis Hernandez, Salvador Carmona, Gabriel Caballero, Melvin Brown.
Bolivia: Oscar Sanchez, Percy Colque, Miguel Hoyos, Edgar Olivarez, Eduardo Jiguchi, Gonzalo Galindo, Raul Gutierrez, Augusto Andaveris, Limberg Gutierrez, Diego Bengolea, Carlos Eguez.
Referee: Michael Kennedy (USA).