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'
|Wenger glad Sanchez is not ´a Costa problem´|
|Flick resigns as DFB´s sporting director|
|Gomis ´can´t wait´ to welcome Payet to Marseille|
|Chinese FA changes foreign player rules after ´irrational´ spending|
|Like father, like son: Justin Kluivert follows in dad´s footsteps|
|´No reason to lose him´ - Marotta rubbishes talk of Allegri exit|
|Courtois: We don´t need Costa|
|Kane: Tottenham players won´t go to China|
|Noble ´angry and disappointed´ with Payet|
|Klopp furious over Matip uncertainty|
|Wenger surprised by tight Premier League|
|´Money is not everything´ - Conte issues warning amid China speculation|
|Fiorentina defeat a ´bad setback´ - Allegri|
|´This will elevate this group of players´ - Sampaoli revels in Sevilla late show|
|WATCH: Rio Ferdinand screams and dances in crazy Man Utd celebration|
|Real Madrid relaxed, admits Zidane after Sevilla defeat|
|Monaco go top of Ligue 1 with stunning Marseille victory|
|Ronaldo equals LaLiga penalty record as Real Madrid lose|
|Sevilla 2 Real Madrid 1: Stunning late comeback ends unbeaten run at 40|
|Fiorentina 2 Juventus 1: Brilliant Viola breathe life into Serie A title race|
|Tunisia 0 Senegal 2: Mane on target as favourites start strongly|
|Mourinho explains Klopp confrontation|
|Klopp delights in Alexander-Arnold display|
|Algeria must cut out mistakes against Tunisia - Leekens|
|Long balls led to Man Utd equaliser, says Klopp|
|´We attacked, Liverpool defended´ – Mourinho insists a point flattered Klopp´s men|
|DR Congo v Morocco: ´Confidence´ the Atlas Lions´ biggest hindrance ahead of AFCON opener|
|Ibrahimovic: Direct tactics worked for United|
|Guardiola rues gap to Chelsea after Goodison mauling|
|Algeria 2 Zimbabwe 2: Mahrez double prevents shock defeat|
|Manchester United 1 Liverpool 1: In-form Ibrahimovic saves hosts|
|Ivory Coast v Togo: AFCON champions hope to tame Le Roy´s ´troublemakers´|
|Guardiola lays City´s mental frailties bare after Goodison rout|
|Koeman hails ´perfect´ Everton after City mauling|
|Nice stalemate gives Monaco chance to go top|
|Guardiola suffers heaviest league loss in Everton thrashing|
|Neymar-esque Zaha is England´s loss – Bolasie|
|Everton 4 Manchester City 0: Koeman leaves old pal Guardiola´s title bid in tatters|
|Matip withdrawn from Liverpool selection over eligibility questions|
|Podolski staying at Galatasaray, insists sporting director|
|Cavani wants PSG stay|
|Torino move feels normal now – Hart|
|Chinese FA changes rule on CSL foreign players - reports|
|Bayern complete swoop for Hoffenheim duo Sule and Rudy|
|Aubameyang: Dortmund not really like Barca, Madrid or Bayern|
|Pogba can chance a game in one second - Herrera|
|Newcastle Jets 2 Perth Glory 2: Keogh´s eighth of season seals draw|
|Klopp: Liverpool ready for Old Trafford test|
|Herrera taunts Liverpool ahead of Old Trafford showdown|
|I had to be 100 per cent to stay at Boca - Tevez|
|No player is bigger than the club - Carroll takes swipe at want-away Payet|
|Icardi: I can always move to China at end of career|
|Mkhitaryan: Klopp convinced me not to join Liverpool|
|Mourinho: Pogba can score every game|
|Cameroon´s profligacy frustrates Broos|
|Pioli lauds ´exceptional´ Icardi|
|´Now they will be favourites´ - Kimmich questions Leipzig´s ability under pressure|
|Toure set for Champions League recall but Guardiola won´t guarantee long-term City future|
|´It can only be speculation´ - Conte cools Costa to China claims|
|Inter 3 Chievo 1: Perisic, Eder strike late to seal deserved win|
|Verratti and Motta fooled no one, says Costil|
|´Look who won the Ballon d´Or´ – Prickly Simeone insists only results matter|
|Burkina Faso 1 Cameroon 1: Dayo snatches draw for Duarte´s side|
|Angry Sanchez no issue for Wenger|
|94th-minute free-kick snaps TNS´ world-record run|
|Conte hails perfect response to Chelsea´s Spurs defeat|
|Chelsea have more points now than entire 2015-16 season|
|Conte speaks out on reported Costa row|
|Cavani´s reaction to being subbed is normal - Emery|
|Chelsea can cope without Costa - Cahill|
|Aubameyang hopes Gabon learn from late equaliser|
|Ronaldinho ready to return to professional football - agent|
|Unfortunate Gestede sets remarkable Premier League record|
|Mandzukic´s track record speaks for itself - Allegri|
|Bayern beat Mainz to win Telekom Cup|
|Atletico Madrid 1 Real Betis 0: Gaitan seals unconvincing win|
|Leicester City 0 Chelsea 3: Costa-cutting not costly for Alonso-inspired leaders|
|PSG won´t buy for the sake of buying - Kluivert|
|´One of the best performances since I´m here´ - Luis Enrique revels in Barca rout|
|I might have left early myself - Moyes|
|Clement confirms ´imminent´ Swansea deals for Olsson, Carroll|
|Mazzarri pays tribute to ´great person´ Taylor following frustrating stalemate|
|Barca calm on Messi contract situation - Suarez|
|´They don´t normally come off like that!´ - Carroll revels in stunning strike|
|Dyche delighted by Barton´s ´lucky finish´|
|Silva outlines importance of Hernandez after stirring Bournemouth win|
|Messi ticks off Las Palmas to match Raul´s LaLiga record|
|Gabon 1 Guinea-Bissau 1: Late Soares equaliser frustrates Aubameyang|
|Wenger confirms ankle injury for Giroud|
|Rennes 0 Paris Saint-Germain 1: Draxler decisive on Ligue 1 debut|
|Barton determined to repay Dyche´s faith|
|Brady hails Antonio´s ´dedication´ as Payet sits out|
|Top six in different league, says Pulis after Spurs thrashing|
|Barcelona 5 Las Palmas 0: In-form Suarez at the double as rampant champions put pressure on Madrid|
|Sunderland 1 Stoke City 3: Arnautovic sinks woeful Black Cats|
|Corinthians just ´waiting for´ Drogba´s signature|
|Watford 0 Middlesbrough 0: Taylor remembered as Boro frustrate lacklustre Hornets|
|Burnley 1 Southampton 0: Barton scores winner on Premier League return|
|Hull City 3 Bournemouth 1: Hernandez fires Silva to debut Premier League win|
|West Ham 3 Crystal Palace 0: Carroll scissor-kick helps Hammers to victory|
|Swansea City 0 Arsenal 4: Giroud, Sanchez strike as fortune shines on Gunners|
|Costa absent but still no start for Batshuayi|
|Tunisia v Senegal: Talent alone not enough for Cisse´s AFCON favourites|
|Vertonghen injury looks bad, says Pocehttino|
|Srna snubs Barcelona|
|No nerves about Messi contract - Bartomeu|
|No nerves about Messi contract - Bartomeu|
|Kane lauds Spurs´ best display this season|
|Pogba loving Ibrahimovic ´connection´|
|DR Congo on strike ahead of AFCON opener|
|Higuain: Juventus turn you into a war machine|
|Algeria v Zimbabwe: Leekens wary of opening slip-up|
|Sturridge: I´m Liverpool´s best striker|
|Tottenham 4 West Brom 0: Kane the daddy as Spurs trounce sorry Albion|
|Zidane hails Ramos as one of Spain´s most inspiring players after Sevilla row|
|Payet sign guarded after West Ham star demands exit|
|Evra still undecided on future|
|A-League Review: Wanderers keeper Janjetovic pelted with snakes on return to Sydney FC|
|Sevilla boss Sampaoli has ´no interest´ in Ramos row|
|Madrid back Ramos in Sevilla row|
|Recovering Bale boosted by Madrid´s record run|
|Pique sits out Barcelona v Las Palmas|
|Luiz calls for cool heads at Chelsea|
|Hazard: Title race not over|
|Liverpool have nothing to fear - Klopp|
|Mourinho backs Pogba to become United captain|
|Wenger reveals Cazorla may miss another 10 weeks|
|´Come on Chelsea!´ - Costa sends Blues backing amid exit talk|