Both Fernando Torres and Juan Mata came off the bench as Spain signed off from their Euro 2012 warm-up programme with a 1-0 win against China.
Manchester City's David Silva scored the only goal of the game six minutes from time after the Spanish had dominated the second half, hitting the woodwork twice shortly before taking the lead.
Torres was one of four half-time substitutions, replacing the Sevilla striker Alvaro Negredo, while Mata came on at the expense of Malaga winger Santi Cazorla in the 68th minute, before having a goal ruled out for offside in the closing stages.
David Luiz and Ramires, meanwhile, played no part as their Brazil side were beaten 2-0 by Mexico in a friendly game played in Dallas, Texas. Giovanni Dos Santos and Manchester United's Javier Hernandez were the goalscorers.