Spain made sure they avoided the playoffs as Alvaro Morata's goal four minutes from time ended Sweden's resistance in Seville.
The Swedes' shock 2-0 defeat to Kazakhstan on Thursday had handed Spain pole position in Group B, meaning La Roja just needed a point to qualify.
Luis Enrique's men were grateful for that reprieve as for a long time a repeat of the stalemate between the sides when they met in the group stages of Euro 2020 was on the cards.
Morata was the fall guy that night for missing a host of chances, but made his mark off the bench with a calm finish after Robin Olsen had turned Dani Olmo's blistering shot onto the bar.