Last updated on .From the section 2014 Fifa World Cup

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.

Costa, who looks set to join Chelsea from Atletico Madrid, had not played since aggravating a hamstring injury in the Champions League final.

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.