Spain edged past Albania with a 2-0 win in World Cup qualifying in Shkoder on Sunday night.
Julen Lopetegui's side were frustrated by the Albanians, who had won both of their previous matches against Macedonia and Liechtenstein, but eventually overcame to take spot in Group G.
The opening goal came 10 minutes into the second half after a mistake from goalkeeper Etrit Berisha whose clearance fell to Vitolo resulting in a through ball to David Silva, who then squared it for Diego Costa to fire home.
It was the Chelsea striker's ninth goal for club and country this season, including three with the national team, and seventh in his last eight in all competitions.
Spain then doubled their advantage on 63 minutes when Manchester City winger Nolito skipped past a poor challenge from Elseid Hysaj son the left side of the area before planting a well-placed effort into Berisha's far bottom corner.
The victory now has the unbeaten La Furia Roja on seven points from three matches which sees them ahead of Italy on goal difference and a point clear of both Albania and Israel.