Brais Mendez scored on his debut as Spain beat Bosnia-Herzegovina 1-0 at Estadio de Gran Canaria.
The 21-year-old attacker, who plays his club football for Celta Vigo, settled the game 11 minutes from time when he turned home the rebound after Isco's effort had been saved.
It helped lift the mood towards the end of a disappointing day for Spain after England's late winner against Croatia denied Luis Enrique's side a place in the Nations League Finals.
Spain made nine changes to the team which lost to Croatia in that competition on Thursday. Only Dani Ceballos and Isco remained while Mario Hermoso made his debut as the fringe players got a chance to try to impress.
A largely uneventful first half finished goalless although Bosnia could have scored inside the opening minute but Kepa Arrizabalaga blocked Edin Visca's shot.
Spain eventually settled and began to impose their possession-based game on their opponents, although without creating any real chances. Isco dragged a tame effort too close to the goalkeeper as half-time approached.
The second half was much more exciting as a series of chances were wasted by Spain - and Alvaro Morata in particular.
The Chelsea striker missed the target with a free header shortly after the restart before firing a shot over the crossbar when he raced through on goal.
At the other end, Bosnia spurned another glorious opportunity to score when Rade Krunic was unable to get enough contact on the ball to turn Visca's cross goalwards.
Morata's poor night continued after 58 minutes when he somehow bundled the ball wide from inside the six-yard box after Marco Asensio's shot was pushed out into his path by the goalkeeper.
Ibrahim Sehic saved well to deny Moreno Rodrigo but Spain finally made the breakthrough in the 79th minute through Mendez.
The 21-year-old almost made it a quick-fire double but his shot from the edge of the area flew just wide.
Asensio should have added a second goal in injury time as Sehic saved but it mattered not and Spain finished the year with a victory after back-to-back 3-2 defeats in the Nations League.