Iago Aspas scored a late goal as Spain beat Tunisia 1-0 in their friendly match.
Tunisia proved to be the better side in the first period, causing the Spain back problems with their high press and swift counter-attacks.
Ferjani Sassi took a shot straight at David de Gea after capitalizing on a mistake committed from rookie full back Alvaro Odriozola in the first 10 minutes before striker Naim Sliti saw a looping effort which landed on the roof of the net moments later.
A last-ditch tackle by Jordi Alba denied Sliti just before the break as Spain looked rattled.
The Spanish coach Julen Lopetegui made a number of substitutions in the second half but they lacked a cutting edge despite enjoying possession.
Spain begin their World Cup campaign on Friday against Portugal before facing fellow Group B rivals Iran and Morocco.
Tunisia, meanwhile, face England, Belgium and Panama in Group G. – Reuters