Alvaro Morata's late goal helped Spain qualify for the 2022 World Cup and consigned Sweden to the play-offs.
Sweden goalkeeper Robin Olsen tipped Dani Olmo's shot on to the crossbar with Morata on hand to tap the ball in after 86 minutes.
Luis Enrique's side needed just a point to top Group B while Sweden needed to win to finish above their opponents.
The result means Spain have qualified for a 12th consecutive World Cup finals.
Sweden will have another chance to reach Qatar in the European play-offs in March.
Spain started the brighter with winger Pablo Sarabia curling an effort narrowly wide from 20 yards in the opening exchanges.
The visitors grew into the match and had a number of chances in the first half with forward Emil Forsberg twice going close to breaking the deadlock.
And Alexander Isak should have put Janne Andersson's side in front when through on goal midway through the second period, but the forward snatched at his chance after capitalising on some lapsed defending.
Spain held on after taking a late lead and keep up their run of reaching every World Cup since 1974.
Latest Stories
-
Expansion Drive: Takoradi Technical University increases faculties
2 hours -
SHS heads demand payment of outstanding funds before reopening of schools
2 hours -
We thank God for the 2024 general elections – Akufo-Addo
3 hours -
Coconut Grove Beach Resort marks 30 years of excellence with memorable 9 lessons & carols service
3 hours -
WAFU B U-17 Girls’ Cup: Black Maidens beat Nigeria on penalties to win inaugral tournament
4 hours -
Real Madrid beat Sevilla to keep pressure on leaders Atletico
5 hours -
Liverpool put six past Spurs to go four points clear
5 hours -
Manchester United lose 3-0 at home to Bournemouth yet again
5 hours -
CHAN 2024Q: ‘It’s still an open game’ – Didi on Ghana’s draw with Nigeria
5 hours -
CHAN 2024Q: Ghana’s Black Galaxies held by Nigeria in first-leg tie
6 hours -
Dr Nduom hopeful defunct GN bank will be restored under Mahama administration
6 hours -
Bridget Bonnie celebrates NDC Victory, champions hope for women and youth
7 hours -
Shamima Muslim urges youth to lead Ghana’s renewal at 18Plus4NDC anniversary
8 hours -
Akufo-Addo condemns post-election violence, blames NDC
8 hours -
DAMC, Free Food Company, to distribute 10,000 packs of food to street kids
9 hours