The triumph - earned by goals from Sergio Ramos, Alvaro Morata and Mikel Oyarzabal - means that La Roja are now five points clear of second-placed Sweden at the top of the section ahead of their next qualifier away to Romania in September.
Spain's team showed eight changes from the one which started against the Faroe Islands on Friday night, with only Kepa Arrizabalaga, Ramos and Isco keeping their spots in the XI. Meanwhile, Sebastian Larsson for Kristoffer Olsson was the only alteration from Sweden's 3-0 win over Malta.
The home side had a couple of half-chances in the period that followed - Dani Parejo seeing a dangerous low cross cleared by Pontus Jansson before Filip Helander did really well to clear a dangerous Isco corner.
Olsen then kept out attempts from Ramos and Parejo in quick succession, moments before Rodrigo Moreno had a goal controversially disallowed for offside following a brilliant team move.
Johansson's first involvement was to hack Isco down in a dangerous position, and Parejo sent the resulting free kick just wide of the Sweden goal as the score stayed level heading into the final 15 minutes of the first period.
Larsson was bright for Sweden as the first half continued to advance, with the former Sunderland midfielder delivering a couple of excellent crosses towards the likes of Marcus Berg and Quaison.
Ruiz, meanwhile, was Spain's best player in the first 45 minutes, and the midfielder sent another powerful effort just over the Sweden goal as Luis Enrique's side looked for the breakthrough before the interval.
The away side continued to stand strong, however, with Jansson making a number of important blocks as the two teams headed down the tunnel on level terms despite strong pressure from La Roja, who also came close through a low Carvajal strike and overhead kick from Ramos.
Isco sent a volley just over the Sweden crossbar in the 53rd minute of the contest, moments after a Mexican wave had started inside the stadium. The Real Madrid attacker then had another chance in the 55th minute, sending a low strike just wide of the Sweden post.
The pressure was almost constant approaching the hour mark, but Jansson continued to impress at the heart of the Sweden defence. The visitors actually had an opportunity of their own just past the hour, although Quaison's strike was straight into the arms of Kepa.
Spain were awarded a penalty in the 63rd minute, however, when Larsson clearly handled a cross from Asensio. Ramos stepped forward and the centre-back found the back of the net with a straightforward effort to finally make the breakthrough in the capital.
La Roja continued to dominate the ball in the period that followed, but opportunities dried up with the score still 1-0 entering the final 10 minutes of action.
Sweden introduced Alexander Isak late on with a view to snatching a late equaliser. However, Spain were awarded a second penalty in the 84th minute when Helander fouled Morata, who stepped up to send his spot kick into the bottom corner after Ramos had moved aside.
The home team then scored a third in the latter stages when Oyarzabal, making his competitive international debut, picked out the bottom corner with a brilliant strike.
SPAIN (4-3-3): Kepa; Carvajal, I Martinez (D Llorente 88'), Ramos, Alba; Ruiz, Busquets, Parejo; Isco, Rodrigo (Oyarzabal 72'), Asensio (Morata 65')
SWEDEN (4-4-2): R Olsen; Lustig, Jansson, Helander, Augustinsson; Forsberg, Ekdal (K Olsen 86'), Larsson (Isak 82'), Claesson (Johansson 27'); Berg, Quaison