David Villa was on target for Spain as they saw off El Salvador 2-0 in their last FIFA World Cup™ warm-up match before heading to Brazil to defend their crown.

The former Atletico Madrid striker scored a header in the 60th minute and added another in the 87th minute, which took his international tally to 58 goals. "We know that in small spaces he is one of the best strikers in the world," said Spain manager Vicente del Bosque.

The champions kick-off their Group B campaign on Friday against the Netherlands in a rematch of the stormy 2010 final they won in South Africa. Spain's other first round opponents are Chile and Australia.

"We still have days to fine-tune and work and I believe that we are prepared to start," Villa said. Villa opened the scoring after a pass to Sergio Ramos pulled Salvadoran goalkeeper Derby Carrillo to his left and away from the posts.

Ramos headed the ball back into the heart of the penalty area and the striker nodded it into the unguarded goal. Villa, who is set to play in Australia later this year before joining a new Major League soccer team in New York next year, made sure of the win three minutes from time.

"They were disciplined. Tactically they played well," Del Bosque said. "They made it difficult for us to impose our will on the game." Spanish striker Diego Costa, who lasted only nine minutes for Atletico Madrid in the Champions League final against Real Madrid due to a right hamstring problem, started and played until the 74th minute with no signs of trouble.

"He did some good things but he hadn't played in a couple of weeks and he needed to get back in condition," del Bosque said. "But overall, I thought he did well."

Del Bosque was pleased to see defender Juanfran Torres play 90 minutes - “good news for us," he said - and termed an injury to defender Jordi Alba "a minor nagging issue but it's nothing to be concerned about."

Spain dominated play early on, owning the ball more than 80 per cent of the first half but with nothing to show for it, including a fourth-minute penalty for Cesc Fabregas that the Barcelona striker curled over the crossbar.

"They were disciplined. Tactically they played well," Del Bosque said. "They made it difficult for us to impose our will on the game." Spanish goalkeeper and captain Iker Casillas rescued Spain in the 49th by grabbing a loose ball in the heart of the penalty area after an errant Spanish backline pass.

Villa slammed a shot off Salvadoran goalkeeper Derby Carrillo's chest in the 53rd minute and had a dangerous effort deflected over the top in the 58th minute, setting the stage for his opening goal.

El Salvador manager Albert Roca had to rebuild the squad after 14 players were banned for life last September for match fixing and was pleased with the performance three days after a 2-1 loss to Brazil-bound Ivory Coast.

"I'm very proud of my players," he said. "They gave 100 per cent on the field. Spain is a much superior team but I'm very proud of our effort.”