Spain ended their qualification campaign by beating Israel 1-0 on a frustrating night at the Teddy Stadium in Jerusalem.
Real Sociedad's Asier Illarramendi got the only goal of the game in the 75th minute to secure the win.
Julen Lopetegui's side had already guaranteed top spot in Group G, but needed a win to boost their chances of confirming their place among the top eight seeds for next summer's World Cup.
A draw with Italy in Turin 12 months ago was the only blemish on the Spanish qualification record, while Israel's chances of reaching Russia had already gone, despite winning three of their first four qualifiers.
Spain made 10 changes to the side that beat Albania 3-0 on Friday night, with Gerard Pique and David Silva suspended.
Israel made just the one change from their 1-0 in Liechtenstein, with Almog Cohen coming in for Lior Rafaelov.
In a scoreless first half, Spain dominated possession and had the better chances.
Marco Ascensio had the game's first shot saved before Pedro and Aritz Aduriz found their efforts stopped by Ariel Harush.
Cohen had the home side's best chance before half-time when his shot was saved by Jose Reina.
A frustrating first half for Spain ended with Pedro having another shot saved.
Ramos was replaced by Celta Vigo forward Iago Aspas to give the Spanish more of a threat up front, but possession still was not being turned into goals.
Jonathan Viera went close for the visitors in the 64th minute just as it looked as though it was going to be one of those nights.
Israel to their credit made life very difficult for the Spaniards, who had to wait until the 75th minute before finally finding the back of the net.
From a corner Illarramendi found a way to beat Harush to break the deadlock.
The goal meant Spain have scored in all of their games under Lopetegui, who becomes the second Spanish manager to remain unbeaten through his first 14 matches.
With a lead to defend, Spain saw the remainder of the game out without any threat to their goal.
The victory meant they topped Group G, five points clear of Italy.