Match ends, El Salvador 0, Spain 2.
Diego Costa made a successful comeback from injury as David Villa scored twice to give Spain victory over El Salvador in their final World Cup warm-up game.
The striker played for 73 minutes and was fouled for an early penalty which Cesc Fabregas missed.
Villa came off the bench to increase his record goal tally for Spain to 58.
The 32-year-old, who announced this week he was leaving Atletico Madrid to join Major League Soccer team New York City, headed in after an hour and then fired home in the sixth minute of injury time.
"We know that Villa, in tight spaces, is one of the best forwards in the world," said coach Vicente Del Bosque.
"The feelings are good and we are optimistic about the start of the competition."
Spain start their World Cup campaign against the Netherlands on 13 June and also face Chile and Australia in Group B.
- 4BarriosSubstituted forBlancoat 87'minutes
- 12Alvarez HernandezSubstituted forAlasat 65'minutes
- 8SantamariaSubstituted forRenderosat 57'minutes
- 6MenjivarSubstituted forAguilaat 83'minutes
- 14Flores MejiaSubstituted forMolinaat 75'minutes
- 1CasillasSubstituted forde Geaat 83'minutes
- 5Torres Belén
- 4Martínez Aguinaga
- 14AlonsoSubstituted forBusquetsat 68'minutes
- 10FàbregasSubstituted forVillaat 45'minutes
- 11PedroSubstituted forCazorlaat 45'minutes
- 19Diego CostaSubstituted forHernándezat 74'minutes
- 6IniestaSubstituted forSilvaat 45'minutes
- 12de Gea
- Baldomero Toledo
- Shots on Target
Second Half ends, El Salvador 0, Spain 2.
Foul by Santiago Cazorla (Spain).
Moises Xavier Garcia (El Salvador) wins a free kick in the defensive half.
Goal! El Salvador 0, Spain 2. David Villa (Spain) right footed shot from the centre of the box to the bottom left corner. Assisted by David Silva.
Substitution, El Salvador. Mark Blanco replaces Jonathan Barrios.
Attempt missed. Sergio Busquets (Spain) right footed shot from more than 35 yards is too high. Assisted by Jordi Alba.
Offside, El Salvador. Alexander Larin tries a through ball, but Rafael Edgardo Burgos is caught offside.
Offside, Spain. Xavi tries a through ball, but David Villa is caught offside.
Substitution, El Salvador. Jonathan Aguila replaces Richard Menjivar.
Substitution, Spain. David de Gea replaces Iker Casillas.
Offside, Spain. Koke tries a through ball, but Juanfran is caught offside.
Sergio Busquets (Spain) hits the bar with a right footed shot from outside the box. Assisted by Xavi.
Attempt saved. Santiago Cazorla (Spain) left footed shot from the centre of the box is saved in the centre of the goal.
Corner, Spain. Conceded by Moises Xavier Garcia.
Foul by Koke (Spain).
Néstor Raul Renderos (El Salvador) wins a free kick in the attacking half.
Substitution, El Salvador. Milton Molina replaces Andres Flores Mejia.
Foul by Sergio Ramos (Spain).
Jonathan Barrios (El Salvador) wins a free kick in the defensive half.