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'
|New Zealand no longer supporting Blatter|
|´Post-World Cup trauma´ affected Mertesacker|
|Racing Club 0 Guarani 0 (0-1 agg): Draw sees Paraguayans through|
|Hamburg shocked by Karlsruher attack - Labbadia|
|Serie A Preview: Napoli, Lazio eye Champions League|
|Hodgson will not overstay England welcome|
|Scholes: United must keep Di Maria|
|Leyton Orient appoint Hendon|
|Benteke has a buy-out clause - Sherwood|
|US Soccer will support Prince Ali in FIFA election|
|Dynamo disappointed with officials after City friendly abandoned|
|Calls for Suarez appeal gather momentum|
|Eredvisie Review: Vitesse denied by late Uth goal, NAC Breda boost survival hopes|
|Rangers 1 Motherwell 3: McCall´s men facing uphill struggle|
|Hamburg 1 Karlsruher 1: Bundesliga side escape with draw|
|Blatter vows to lead FIFA clear of trouble as corruption scandal rolls on|
|Bundesliga: Bayern Munich season review - League crown not enough to signal successful campaign|
|Genoa forced to wait for UEFA licence|
|Injured Cardozo out of Paraguay squad|
|CONCACAF provisionally dismisses Webb and Li|
|Klopp: Career highlights of a charismatic coach|
|Verona v Juventus: Ogbonna seeks strong Champions League warm-up|
|FA charges Demetriou over betting breaches|
|Atalanta v Milan: Inzaghi faces last chance to prove worth|
|King joins Bournemouth as QPR rebuild begins|
|Plymouth part ways with Sheridan|
|Hernandez banned for three matches|
|Chelsea star Fabregas has nose surgery|
|Blatter: More bad news may follow|
|Galliani hopeful over Ancelotti deal|
|Frontzeck to continue as Hannover coach|
|Tremmel released as Tate waves goodbye to Swansea|
|Arsenal v Aston Villa: Sherwood out to upset holders|
|UEFA open to boycott of World Cup - Platini|
|Porto activate release clause for Casemiro|
|Athletic Bilbao v Barcelona: Catalans seeking second leg of treble|
|Auxerre v Paris Saint-Germain: History beckons for Ligue 1 champions|
|Cole confirms West Ham departure|
|UEFA elect not to boycott FIFA Congress|
|Borussia Dortmund v Wolfsburg: Klopp aiming for triumphant farewell|
|Flamini hails Coquelin impact at Arsenal|
|South Africa deny wrongdoing in World Cup bid|
|Benitez confirms Napoli exit|
|McShane among six released by Hull|
|Cerci committed to Milan|
|West Ham expect Collins to return for pre-season|
|Real deny Pogba bid|
|Important to keep Chelsea squad together - Mourinho|
|Alonso: Gerrard was magic|
|Pochettino silent on Ings speculation|
|Visa threatens to ´reassess´ sponsorship amid FIFA scandal|
|Blatter skips FIFA Medical Conference|
|MLS Preview: Revs not out for revenge against Galaxy|
|MLS Review: Sounders go top in West, Timbers and Galaxy win|
|AFC stands by Blatter|
|Matheus ´alright´ after collapse - Markevych|
|Copa Libertadores Review: River, Inter through to semis|
|Signing Toni a ´long shot´ for Adelaide|
|Ramsey good enough for Barca - Coleman|
|Bacuna pushing for Benteke stay|
|Evans stunner settles City friendly in Toronto|
|Banega: Emery a great coach|
|Emery tight-lipped on Sevilla future|
|Argentina finalise Copa America squad|
|Nike issues statement following arrest of FIFA officials|
|Hero Bacca grateful for Europa League triumph|
|Markevych rues defensive errors in Dnipro defeat|
|AFC Champions League Review: Naft Tehran fairytale continues|
|Emery: We deserved Europa League success|
|Dnipro 2 Sevilla 3: Bacca brace sees holders make history|
|South Africa 0 Malawi 0 (4-5 on penalties): Harawa heroics send Bafana Bafana out|
|CONCACAF and CONMEBOL respond to arrests in FIFA scandal|
|FIFA president Blatter welcomes investigations as corruption probe rocks world football|
|UEFA calls for FIFA elections to be postponed|
|BREAKING NEWS: Advocaat exits Sunderland and retires from club management|
|La Liga: Real Madrid season review - Ancelotti pays the price for disappointing season|
|Zambia 3 Ghana 0: First-half spree does the damage|
|Barnes suffers double knee ligament injury|
|Balotelli to stay at Liverpool - agent|
|Kane at the double in friendly win|
|Norwich make Dorrans switch permanent|
|Ings unsure of next move|
|Bournemouth snap up Federici|
|FIFA ´crisis´ cannot continue - Prince Ali|
|Barton headlines QPR exits|
|Juan demands more from Inter|
|Stoke snap up Haugaard|
|Subotic commits to Dortmund|
|Warner pleads innocence after US indictment|
|Napoli to refuse questions on Benitez´s future|
|USDoJ names indicted FIFA officials|
|Wenger coy over Vidal and Benzema moves|
|Suarez back in training ahead of Copa final|
|Pique: I´ll retire at Barca|
|Gerrard ´blown away´ by Liverpool send-off|
|FIFA ´very happy´ with Zurich arrests|
|Liverpool defender Toure targeting trophies|
|Ramsey eyeing title assault|
|Welbeck out of FA Cup final and England matches|
|FIFA the ´injured party´ as Swiss prosecutors open criminal proceedings|
|Prince Ali saddened by FIFA arrests|
|Pellegrini to make City defence a priority|
|Labbadia giving Lasogga, Olic, Jiracek time|
|Ramsey confident on Wembley chances|
|Swiss authorities confirm FIFA arrests|
|El Shaarawy open to Premier League move - agent|
|Reports: FIFA officials set to be arrested|
|Tigres UANL 2 Emelec 0 (2-1 agg): Mexicans through to Libertadores semis|
|Valencia ruled out of Copa America|
|Coleman: Bale being ignored by Real team-mates|
|Ruddy eyes England recall|
|Benteke will strike fear into Arsenal - Westwood|
|Howe named LMA Manager of the Year|
|Casillas reiterates desire to stay in Madrid|
|Dnipro players pay for fans´ tickets, transport|
|Galliani: I want Ancelotti back at Milan|