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'
|Mourinho: Victory at Stoke means more than three points|
|Postecoglou picks attacking Australia squad|
|Allegri disappointed by wasteful Juve|
|Benitez revels in Napoli´s Supercoppa Italiana win|
|Stoke City 0 Chelsea 2: Fabregas fires visitors to festive number one spot|
|Juventus 2 Napoli 2 (aet, 5-6 on pens): Rafael´s shootout heroics seal victory|
|Ki has mixed feelings over Asian Cup|
|Lafita set for six-month lay-off with ligament injury|
|Dyche dismisses Ings exit speculation|
|Turkish Super Lig Review: Balikesirspor record rare win, Carlos bows out at Sivasspor|
|Freibug agree deals for Daehli and Petersen|
|Kampl set to join Dortmund|
|Al Shabab 1 Al Ain 1: Ahmad rescues late point for visitors|
|Blackpool chairman Oyston apologises for supporter spat|
|Flamini expects Arsenal to kick on|
|Brighton accept Hyypia resignation|
|FA charge Leeds defender Bellusci for alleged racist abuse|
|Uncapped Lee named in South Korea squad|
|Gutierrez makes Newcastle comeback|
|Ji to rejoin Augsburg from Dortmund|
|Holders ES Setif learn Champions League fate|
|Kraft extends Hertha deal|
|FIFA reform process ongoing - Blatter|
|Walsh: Leicester should stick with Pearson|
|Hodgson optimistic for England´s future|
|Milan chief Galliani targets Champions League|
|Hull recall Ince and Figueroa|
|Stranzl extends Gladbach stay|
|Redknapp not ruling out Morrison return|
|Barnes hopeful of keeping his place|
|Lambert hails ´outstanding´ Okore|
|Kramer pens Leverkusen extension|
|Lacazette will not rest on laurels|
|Hughes: Chelsea can win quadruple|
|Liverpool are turning the corner - Lallana|
|Ramos: No rush on contract talks|
|Johnson: Derby winner one of my finest hours|
|Juan credits Mancini for Inter revival|
|Allardyce eyeing London derby success|
|Juanfran targets new-year push|
|Long slams Southampton critics|
|Guidetti out, Griffiths in hints Deila|
|Spurs forward Kane targets 20 goals|
|Lyon fitness key to Bordeaux thrashing - Fournier|
|Santa Fe 1 Medellin 1 (agg 3-2): Hosts win Clausura title|
|Emelec 3 Barcelona 0 (4-1 agg): Bolanos brace seals title defence|
|Pioli: Lazio did not switch off|
|No Park in South Korea´s Asian Cup squad|
|Gignac: Marseille lead ´a huge boost´|
|Simeone applauds Griezmann´s hat-trick|
|Redknapp vows to keep QPR sharpshooter Austin|
|Santiago Wanderers 1 Palestino 6 (agg 2-9): 36-year drought ends for visitors|
|Juan Aurich 2 Sporting Cristal 3 (aet, agg 4-5): Chavez hands visitors Peruvian title|
|Liga del Futbol Profesional Boliviano Review: Bolivar win title|
|Mancini plays down Lennon transfer rumours|
|Ligue 1 Review: Marseille end 2014 top of the table, Lyon leapfrog PSG|
|Kovacic has mixed emotions after Inter draw|
|Serie A Review: Lazio go third despite Inter rally, Sampdoria held|
|La Liga Review: Griezmann the man for Atleti, Villarreal gain fifth straight win|
|Primeira Liga Review: Benfica win six straight|
|Athletic Bilbao 1 Atletico Madrid 4: Griezmann hat-trick seals comeback win|
|Inter 2 Lazio 2: Hosts rally to claim draw|
|McCoist makes Rangers exit|
|Sturridge on course for January return - Rodgers|
|Liverpool getting back on track, says Rodgers|
|Wenger bemoans failure to defend set-pieces|
|Bundesliga Review: Hoffenheim enjoy big win, Freiburg falter late on|
|Zorc: Dortmund to stick with Klopp|
|Liverpool 2 Arsenal 2: Bandaged Skrtel rescues a draw|
|I have no problem with Payet, insists Bielsa|
|Eredivisie Review: Ajax leave it late, Vitesse finally win|
|Pardew rues over-zealous Newcastle approach|
|Benitez hopeful ahead of Supercoppa|
|I nearly took Johnson off - Poyet|
|Johnson revels in derby late show|
|Juventus must maintain focus, warns Allegri|
|Newcastle United 0 Sunderland 1: Johnson settles derby|
|Carlos leaves Sivasspor post|
|Dundee United 2 Celtic 1: Ciftci inspires surprise win|
|Mourinho against use of independent panels|
|Hartlepool not interested in signing Evans|
|Reed delighted with first Southampton start|
|Bremen agree Oztunali loan|
|Irvine backs Ideye to end goal drought|
|Carrick backs Falcao to kick on|
|Dortmund will come back stronger, vows Klopp|
|Bojan senior slams Barcelona|
|Eredvisie title not won yet - Depay|
|Sterling eager to catch Arsenal cold|
|Monk: Ki will be sorely missed|
|Bruce looking to recall Hull duo from loan spells|
|Allardyce: Pearson deserves time|
|Sydney 0 Wellington Phoenix 2: Burns at the double|
|Real Madrid 2 San Lorenzo 0: Spanish giants complete triumphant 2014|
|McCoist: Departures sucking life out of Rangers|
|Hargreaves urges Sterling to stay put|
|Herediano 1 Deportivo Saprissa 1 (agg 3-5): Draw hands visitors consecutive titles|
|Tribulietx basks in Auckland City´s heroics|
|San Lorenzo´s Bauza applauds Ancelotti|
|Wenger: Sanchez a Footballer of the Year candidate|
|Chelsea like United´s treble-winning team - Hargreaves|
|Ancelotti: Copa del Rey victory inspired Real´s stunning run|
|La Liga Review: Catalan clubs triumph|