Young midfielder Gavi fired home early in the second half to help the 2008 and 2012 European championship winners progress to the tournament in Germany next summer, with two games to spare.
Norway, who last appeared at a major tournament in Euro 2000, and their star striker Erling Haaland can now only potentially qualify through play-offs but need to hold onto third and hope Serbia qualify from Group G to be eligible.
Spain barely allowed Haaland a sniff all night long on a frustrating night for Norway, who sit five points behind their opponents and Scotland, joint top, with only one match remaining.
Luis de la Fuente started Fran Garcia in place of the injured Alejandro Balde at left-back and also brought Ansu Fati and Fabian Ruiz into the team.
Spain had the better of the opening period, with Dani Carvajal hammering a strike wide of the near post.
La Roja thought they had taken the lead after 20 minutes when Stefan Strandberg diverted the ball towards his own net and Alvaro Morata greedily hammered home from almost on the goal line.
However, the strike was ruled out for offside against Morata — Carvajal’s lofted ball forward was aimed at Fati before Strandberg’s intervention and if he had left the ball it would have been an own goal.
Gavi eventually fired Spain ahead in the 49th minute after a hectic scramble in Norway’s area, pouncing when Mikel Oyarzabal’s shot was deflected into his path.
It was the 19-year-old Barcelona midfielder’s fifth goal for his country in 25 appearances.
Arsenal playmaker Martin Odegaard sliced an effort wide at the other end as the hosts made a rare foray forward, and Spain goalkeeper Unai Simon saved comfortably from bright teenager Antonio Nusa.
Morata had a shot cleared off the line in the final stages but was offside anyway as Spain sought a second goal to clinch progress.
It did not come but it did not matter, as a flat Norway could not muster danger during eight minutes of added time, apparently resigned to their fate, while Spain broke into celebrations at the final whistle.
De la Fuente’s side started their qualifying campaign with an early defeat by Scotland which called the coach’s surprise appointment into question, but Nations League victory in June and straightforward qualification for the Euros since have convinced.
AFP