A stunning strike from Asier Illarramendi ensured Spain finished their World Cup qualifying campaign with a flourish as they edged out Israel at the Teddy Stadium in Jerusalem.
Julen Lopetegui's much-changed side were a long way from their fluent best and had to rely on a moment of magnificence from the Real Sociedad midfielder, who thrashed a 25-yard half-volley into the top corner of Ariel Harush's net in the 76th minute.
Pedro had earlier wasted a golden opportunity to break the deadlock at the end of the first half, while Jonathan Viera and Marco Asensio also came close with long-range strikes.
Spain, for whom Sergio Busquets earned his 100th cap, had already secured their place in Russia next year following a 3-0 win over Albania on Friday, and Illarramendi's goal means they finish Group G having won nine of their 10 games.
Despite making 10 changes from the side that cruised past Albania, Spain quickly hit their stride with Asensio's long-range strike forcing Harush into a smart save inside the opening minutes.
Pedro then saw a powerful effort from the edge of the area punched clear by Harush before debutant Viera sent a dipping shot from distance narrowly over the crossbar.
Spain continued to look like the only side capable of making a breakthrough as the half wore on with Aritz Aduriz the next to test Harush with a looping header.
Harush was called into action again soon after as he acrobatically tipped over Sergio Ramos' thumping 30-yard drive.
Bibras Natcho drilled over after a rare attack from the hosts, before Spain squandered the clearest opening of the game just prior to the break. An incisive pass from Viera set Pedro free behind the Israel backline but the Chelsea forward's low shot was too close to Harush, who was able to push away.
Israel started the second period with a vigour that was missing from their first-half display, resulting in Tomer Hemed prodding wide from close range three minutes after the restart.
Aduriz then missed a glorious opportunity to break the deadlock for the visitors as he failed to make contact with a teasing ball across the box with the goal at his mercy.
The lively Viera then tried his luck again from distance, this time whipping an effort narrowly past Harush's left-hand post.
As the game looked to be petering out to a goalless finish, Illarramendi stepped up to deliver a winner of the highest quality. A corner fell to him 25 yards out and the 27-year-old let fly with a swerving half-volley into the top corner for his first international goal.