Match ends, Spain 1, Bosnia and Herzegovina 0.
Celta Vigo's Brais Mendez scored on his debut as Spain ended their run of two defeats with victory over Bosnia and Herzegovina at a wet Las Palmas.
It seemed as if Spain were heading for another poor result until Mendez fired in after keeper Ibrahim Sehic failed to hold onto to Isco's shot.
Chelsea's Alvaro Morata should have given Spain the lead but he missed an awkward chance from four yards out.
Real Madrid forward Marco Asensio also also spurned two good chances.
The result might come as some sort of consolation for Spain coach Luis Enrique after his side's participation in the inaugural Uefa Nations League was ended by England's victory over Croatia, three days after they were beaten 3-2 by the Croats.
Spain barely troubled the visiting defence up until the goal.
Long-range efforts from Suso, Isco and Asensio lacked accuracy, while Bosnia's defence coped comfortably with Spain's attempts to cut through them.
Asensio, with only three goals for club and country this season, should have nodded La Roja into the lead, but sent his header wide by two feet.
He then managed to test Sehic with a shot that was parried into the path of Morata. However, the ball came at the Blues striker at such speed he could not adjust his feet to tap home into the empty net.
Mendez came on soon after, and scored the match-winner 13 minutes from time when he tucked in after Isco's low drive was parried.
He became the first player to score on his debut for Spain since Iago Aspas in November 2016 against England.
- 13ArrizabalagaSubstituted forLópezat 75'minutes
- 19Castro OttoSubstituted forAzpilicuetaat 51'minutes
- 3GayáBooked at 21mins
- 8CeballosSubstituted forFornalsat 64'minutes
- 11Fernández SaezSubstituted forMéndezat 59'minutes
- 7MorataBooked at 56minsSubstituted forRodrigoat 64'minutes
- 1De Gea
- 17Iago Aspas
- 21SaricBooked at 38minsSubstituted forPrcicat 79'minutes
- 8ViscaSubstituted forBajicat 81'minutes
- 11DzekoSubstituted forKodroat 85'minutes
- 19KrunicSubstituted forDuljevicat 62'minutes
- Carlos Xistra
- Shots on Target
Second Half ends, Spain 1, Bosnia and Herzegovina 0.
Attempt missed. Pablo Fornals (Spain) right footed shot from outside the box is high and wide to the right. Assisted by Isco.
Attempt saved. Marco Asensio (Spain) left footed shot from the right side of the box is saved in the bottom left corner. Assisted by César Azpilicueta.
Attempt missed. Diego Llorente (Spain) header from the centre of the box misses to the right. Assisted by Isco with a cross following a corner.
Corner, Spain. Conceded by Haris Duljevic.
Corner, Spain. Conceded by Ermin Bicakcic.
Corner, Spain. Conceded by Ervin Zukanovic.
Attempt missed. Mario Hermoso (Spain) left footed shot from the left side of the box is just a bit too high. Assisted by Isco following a corner.
Corner, Spain. Conceded by Gojko Cimirot.
Substitution, Bosnia and Herzegovina. Kenan Kodro replaces Edin Dzeko.
Foul by Marco Asensio (Spain).
Haris Duljevic (Bosnia and Herzegovina) wins a free kick in the defensive half.
Substitution, Bosnia and Herzegovina. Rijad Bajic replaces Edin Visca.
Attempt missed. Brais Méndez (Spain) left footed shot from outside the box is close, but misses to the left. Assisted by Isco.
Substitution, Bosnia and Herzegovina. Sanjin Prcic replaces Elvis Saric.
Goal! Spain 1, Bosnia and Herzegovina 0. Brais Méndez (Spain) left footed shot from the centre of the box to the bottom left corner.
Attempt saved. Isco (Spain) left footed shot from outside the box is saved in the centre of the goal. Assisted by César Azpilicueta.
Attempt blocked. Marco Asensio (Spain) left footed shot from outside the box is blocked.
Isco (Spain) wins a free kick in the attacking half.