KRASNODAR -- A late goal from substitute Iago Aspas gave an under-par Spain an unconvincing 1-0 victory over Tunisia on Saturday as they brought their preparation for the World Cup to a close.
Aspas' effort came six minutes from time after fellow substitute Diego Costa broke the Tunisia offside trap before teeing up his strike partner.
The result means coach Julen Lopetegui has gone his first 20 games in charge of the 2010 world champions unbeaten, however fewer results will have been as unconvincing.
Tunisia, who have also qualified for Russia, were the better side in the first period, causing the Spain back four numerous problems with their high press and swift counter-attacks.
Ferjani Sassi fired straight at David De Gea after latching on to a mistake from rookie full-back Alvaro Odriozola inside the first 10 minutes before forward Naim Sliti saw a looping effort land on the roof of the net moments later.
A last-ditch Jordi Alba tackle then denied Sliti just before the break as Spain looked rattled.
Lopetegui made a number of changes in the second half, and while Spain improved, they lacked a cutting edge, enjoying vast swathes of possession but struggling to test Aymen Mathlouthi in the Tunisia goal until Aspas' late intervention.
Spain get their World Cup campaign underway on Friday against Portugal before facing fellow Group B rivals Iran and Morocco.
The North Africans, meanwhile, face England, Belgium and Panama in Group G.