Reigning European champions Portugal defeated 2-0 Switzerland in Lisbon to finish top of European Qualifying Group B and reach the 2018 World Cup in Russia.
A draw or a loss would have left Portugal in the play-offs but an own goal from Johan Djourou and a goal from Andre Silva took Portugal through.
France beat Belarus 2-1 to win Group A, with Sweden finishing second despite losing 2-0 to the Netherlands.
The Dutch, who finished third in the 2014 World Cup, are eliminated.
They needed a seven-goal win to nudge Sweden out of the play-offs but could not add to the two first-half goals scored by Arjen Robben, who retired from international football after the game.
Portugal scored 32 goals in their 10 World Cup qualifying matches the highest so far in this qualification series.