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
-
Unilever Ghana unveils new chapter for Pepsodent Charcoal with “Crafting Smiles” experience
3 minutes -
18,000 babies are born annually with sickle cell disease in Ghana – Dr Kwarley Asare
6 minutes -
World Sickle Cell Day: Dr Asare urges collective action as GICG marks 50 years of sickle cell care
17 minutes -
Woman drowns in abandoned galamsey pit at Anyaaso in Ashanti Region
34 minutes -
‘Ghana Must Go’ wows patrons, sets stage for global tour
47 minutes -
Hearts appoint Didi Dramani as head coach
53 minutes -
Justice Ackaah-Boafo stumbles through nat’l pledge in light-hearted moment during vetting
1 hour -
Train judges on AfCFTA to safeguard Africa’s free trade vision – Justice Ackaah-Boafo urges
1 hour -
Cedi’s appreciation triggers price cuts, discounts at ‘Ecobank JoyNews Habitat Fair’ mini clinic
2 hours -
Stop blaming us for galamsey; you hired them – Chinese Ambassador fires back at Ghanaians
2 hours -
The Stirring You Can’t Ignore: 3 Signs God Is Calling You Into MORE
2 hours -
Police launch raid on illegal miners in Asenanyo Forest Reserve
2 hours -
Justice Ackaah-Boafo condemns ‘mob justice’, urges faith in Ghana’s legal system
2 hours -
Keep Supreme Court retirement age at 70 – Justice Ackaah-Boafo urges
2 hours -
Mr. Mike Eghan
2 hours