Spain qualified for next year's World Cup finals in Qatar by beating visitors Sweden 1-0 thanks to a goal by substitute Alvaro Morata late in the second half on Sunday (Nov 14).

Spain, who won the 2010 World Cup in South Africa, finished top of Group B with 19 points, four ahead of the second-placed Swedes who could still qualify through the playoffs in March.

Morata struck in the 86th minute when he cleverly lifted the ball over Sweden goalkeeper Robin Olsen after Dani Olmo's fierce long-range drive came back off the post into his path.

Spain, playing in front of 52,000 fans in the sold-out La Cartuja stadium, had never lost a home game in World Cup qualifiers and kept their record intact in Seville.

They had only ever lost four of 52 games in the city.

It was a nervous affair and although Spain dominated play, the Swedes created the best opportunities through the dangerous Emil Forsberg and Alexander Isak on the counter-attack.

After playing the full 90 minutes in Sweden's 2-0 loss to Georgia on Thursday, Zlatan Ibrahimovic started on the bench and made little impact when he came on for the last 20 minutes.

The game looked to be heading for a draw, which would have been enough to take Spain to the finals, when Olmo's stunning strike rebounded off the woodwork to Morata, who had come on just before the hour mark, and he calmly put the ball in net.

It will be Spain's 16th appearance in 22 World Cups and the last time they failed to qualify was in 1974.

-Reuters