Two second-half goals from David Villa secured a 2-0 win for Spain over El Salvador in their final World Cup warm-up clash on Saturday.
Spain's record goalscorer and recent New York City acquisition was required to spare his country's blushes as they were forced to work hard at FedEx Field in Maryland on Saturday.
Cesc Fabregas' penalty woes at international level continued as he spurned a spot-kick early on in what proved to be a frustrating goalless first half for the world and European champions.
However, substitute Villa opened the scoring 15 minutes into the second half when he fired home Sergio Ramos' headed knockdown into an empty net.
He then added a second two minutes from time to cap off a positive outing for Spain, who were given a stern test of their offensive capabilities.
Despite recent injury problems, Diego Costa came through 74 minutes unscathed to boost Vicente Del Bosque's side of their World Cup opener against the Netherlands on Friday.
Fabregas wasted a glorious opportunity to open the scoring from the penalty spot after just four minutes following a foul on Costa by goalkeeper Derby Carrillo inside the area.
However, the Barcelona man sidefooted his penalty over the crossbar as he missed a third spot-kick in normal time for his country.
Carrillo was busy early on - first thwarting Pedro with a good save one-on-one before keeping a speculative long-range drive from Ramos out.
Del Bosque's men continued to probe but, for all their dominance, they were frustrated by a resilient El Salvador back line.
Spain were given a scare when Jordi Alba went off for treatment following a strong challenge, although he was able to return to action soon afterwards.
Alexander Larin then had El Salvador's first attempt on goal - a free-kick from well outside Spain's penalty area that went high and wide - before Spain resumed their near-complete control of possession.
Despite plenty of intent, Spain's deft lobbed passes and slick movement failed to yield a breakthrough before the interval, with Del Bosque opting to replace Fabregas, Andres Iniesta and Pedro with Villa, Santi Cazorla and David Silva.
The latter produced a strong run shortly after the break but saw his shot blocked, before Villa was denied by Carrillo at close range.
However, the experienced Villa was on hand just before the hour to capitalise on Ramos' knockdown and finish well into an open goal.
Sergio Busquets was unfortunate not to add to Spain's tally when his long-range strike hit the crossbar, but Villa did finally add gloss to a hard-fought win when he slotted home Silva's cross following a clever turn late on.
|Coach: Albert Roca|
for K. Santamaría 57'
for A. Álvarez 65'
for A. Flores 75'
for R. Menjívar 83'
for J. Barrios 87'
|Cruyff: Barcelona have lost their values|
|Vydra seals Watford move|
|Ambitious Clyne targets trophy haul with Liverpool|
|Claridge: Off-field incidents cost Pearson his job|
|Clyne becomes Liverpool´s sixth close-season signing|
|Imbula leaves Marseille for Porto|
|FIFA chief Blatter challenges critics to prove corruption claims|
|Distin joins Bournemouth|
|Bayern seal Costa deal|
|Arsenal confirm Diaby departure|
|Blatter to miss Women´s World Cup final|
|Bogdan sets sights on being Liverpool number one|
|Danilo eager to get started at Real Madrid|
|Leicester´s Wood joins Leeds|
|Porto confirm Atletico move for Martinez|
|Lloyd: Repetition key to netting penalty|
|Sheffield Wednesday job a ´dream´ for Carvalhal|
|´We played a complete game´ - Messi|
|Diaz upbeat despite heavy Copa loss to Argentina|
|Martino lauds Messi for selfless performance|
|Viviani makes surprise Verona switch|
|Estonian team wins cup match 31-0|
|No meeting with Arsenal has occurred - Vidal´s agent|
|United States 2 Germany 0: Ellis´ team reach World Cup final|
|Argentina 6 Paraguay 1: Messi leads Martino´s men to Copa final|
|UEFA Europa League Review: FK Zeljeznicar and FC Dacia Chisinau open with wins|
|UEFA Champions League Review: FC Pyunik make winning start|
|Sweden U21 0 Portugal U21 0 (aet, 4-3 on penalties): Carlgren the hero as Swedes claim Euro glory|
|Frankfurt capture Castaignos|
|Bastia face relegation over debt|
|Bahlouli makes Monaco switch|
|Pearson sacked by Leicester|
|Rekik set for Marseille switch|
|Ranocchia and Carrizo sign new Inter deals|
|Crespo handed Modena role|
|Cech reveals work permit prevented past Arsenal move|
|Ivory Coast cut coaching shortlist down to five|
|McCarthy satisfied with Mings sale|
|Heaton commits to Burnley|
|Bowyer: Rhodes and Gestede will not come cheap|
|Burton and Day depart West Brom|
|Mendilibar makes Eibar return|
|Milan agree to terminate Muntari contract|
|Copa final a dream come true for Sampaoli|
|CSKA Sofia demoted due to financial crisis|
|Wolfsburg warn off De Bruyne suitors|
|Kone: I want to prove I can cut it at Everton|
|West Ham v Lusitans: Bilic set for first game in charge|
|Millennium Stadium to host 2017 UEFA Champions League final|
|Ronaldo a ´possibility´ for Portugal´s Olympics squad|
|Liverpool should get rid of Sterling - Grobbelaar|
|Miranda arrives for Inter medical|
|Arsenal can challenge the best - Cech|
|Real star Bale can be better than Ronaldo, says Keegan|
|UEFA approves changes to FFP rules|
|Honduras v Mexico: Moreno´s injury may force Mexican rethink pre-Gold Cup|
|Hiddink was the wrong man for Netherlands - De Boer|
|Vargas: I was scoring with every shot at training|
|Zambrano red rocked Peru - Gareca|
|Paraguay to change tack against Argentina|
|Sampaoli thrilled with substitutes´ influence, applauds Peru|
|Martino rues Copa America date with former side Paraguay|
|Former Birmingham City player Thwaites among Tunisia victims|
|Chile 2 Peru 1: Zambrano´s red card helps hosts into Copa final|
|Thiago Silva: ´I didn´t even know the ball had hit my hand´|
|Ronaldinho set to sign for Antalyaspor|
|Jara ban reduced on appeal by one match|
|Hiddink leaves Netherlands post|
|Cresswell pens new five-year deal at West Ham|
|Koeman: No serious United bid for Schneiderlin|
|Barbados eliminated from World Cup qualifying after fielding ineligible player|
|Former Catania president admits buying matches|
|Jones agrees Manchester United deal|
|Argentina v Paraguay: Valdez hoping not to need another comeback|
|Milan seal Bertolacci signing|
|Cech grateful to Abramovich and Chelsea fans|
|UEFA Champions League Preview: Brotherly pride at stake as B36 play TNS|
|UEFA Europa League Preview: Tommasi set to aid La Fiorita qualifying bid|
|Cech leaves Chelsea to join Arsenal|
|Paulinho ends Spurs frustration with Guangzhou move|
|Sampdoria confirm Eto´o exit amid Antalyaspor talk|
|Garcia departs Espanyol ahead of expected Qatar move|
|Watford to delay Doyley decision|
|Schlupp agrees new Leicester deal|
|Schweinsteiger hints at Bayern stay amid United links|
|Bertolacci thrilled ahead of Milan move|
|Langerak leaves Dortmund for Stuttgart|
|Muniain extends Athletic contract|
|Youngsters to get chance on US tour - Van Gaal|
|La Liga chief hits out at Real Madrid over TV rights opposition|
|Villa confirm Wilkins as assistant manager|
|Dicks joins West Ham coaching staff|
|Heldt enters to jeers, exits to cheers|
|Paraguay pride has grown at Copa America - Aguilar|
|Van Gaal tight-lipped on De Gea|
|Bacca confirms Milan agreement|
|Weight of expectation on hosts Chile to benefit Peru - Gareca|
|MLS Review: Timbers thump Sounders thanks to Adi´s double|
|Dzeko ´would run to Roma´ - Pjanic|
|Peru won´t sit back - Sampaoli|
|Zenga: Cassano, Balotelli will not be joining Sampdoria|
|Victory to start A-League defence away to Adelaide|
|I want to play MLS ´at the peak of my career´ - Johannsson|
|Allegri: I like Isco and Oscar|