Alvaro Morata’s late goal helped Spain clinch a 1-0 win over Sweden in Seville on Sunday and secured top spot in Group B of European qualifying.
Sweden will go into a play-off next March to reach the tournament while Spain can begin preparations for their 12th consecutive World Cup finals.
Only Brazil (all 21), Germany (18) and Argentina (13) have qualified for more consecutive tournaments than Spain, who have reached every finals since 1978.
“Today has been a very beautiful day. We have suffered a lot, but the players have had faith and have taken their deserved prize,” Spain head coach Luis Enrique told a media conference.
“It is an excellent group of players. Not only the 25 who are here but all those who have been coming.
“We are already in the World Cup and to be honest I have taken a big weight off my shoulders.
“I have felt much more pressure in these last games than in the European Championships or in the Nations League.
“When you have to achieve something that seems easy or you have to do it because of history, you put pressure on yourself.
England on verge of reaching World Cup as Kane treble destroys Albania
“We have worked on the psychological aspect and we have transmitted to the players the necessary confidence. We have generated enough to win the game.”
Morata has played 50 games for Spain in all competitions since his debut in November 2014 against Belarus and since then he has netted 23 goals for La Roja.
His winner against Sweden after coming on as a substitute means he has 10 more goals than any of his compatriots during that time and Luis Enrique hailed his impact for La Roja.
He said: “There is not a player that represents more than Morata overcoming adversity and criticism.
“Morata is always available to help. He is a very versatile player.”
Morata acknowledged it is unthinkable for Spain, who won the World Cup in 2010, to not qualify for the tournament.
“Spain has to be in all the World Cups,” Morata told RTVE.
“We have worked a lot to achieve the goal. We have also had bad times together, now every time there are more nerves and more emotion.
“I needed to qualify for the World Cup and win, we are a great group and we deserve to be in the World Cup and we will be there.”