Portugal and France secured their places at next summer's World Cup finals but Holland will miss out on a second successive major tournament.
Portugal's 2-0 victory over Switzerland in Lisbon saw the European champions usurp their opponents at the top of Group B.
Switzerland had maximum points going into the decider but they were second best on the night and a Johan Djourou own goal just before half-time set Portugal on their way before Andre Silva's 57th-minute strike settled the nerves at the Estadio da Luz.
Portugal finished top of the group on goal difference and Switzerland will try to follow them to Russia via the play-offs.
Elsewhere in Group B, two goals from Valerijs Sabala and further strikes from Davis Ikaunieks and Igors Tarasovs gave Latvia a 4-0 home win against Andorra while Daniel Bode's late effort saw Hungary win 1-0 at home against Faroe Islands.
France made sure they finished top of Group A with a 2-1 win over Belarus in Paris. Antoine Griezmann and Olivier Giroud were on the scoresheet for the French before Anton Saroka pulled a goal back just before half-time.
Holland, who also failed to qualify for the last European Championships, had to beat Sweden by seven goals to finish behind France in the runners-up spot but they could only manage a 2-0 win against the Swedes, who will head to the play-offs.
The unthinkable looked more possible when Arjen Robben scored from the penalty spot after 16 minutes but the Bayern Munich winger's second strike just before half-time was the only other goal of the game.
Luxembourg's point in a 1-1 home draw with Bulgaria meant they did not finish bottom of Group A. That distinction fell to Belarus after Olivier Thill's early opener for the hosts. However, they were denied a rare win by Ivaylo Chochev's equaliser.
Greece, European champions in 2004, made sure they were in the play-offs after beating Gibraltar 4-0, with Konstantinos Mitroglou scoring twice in between goals from Vassilis Torosidis and Giannis Gianniotas.
Belgium were already assured of winning Group H and they also finished their qualifying campaign with a 4-0 home victory. Thorgan Hazard scored in between two goals from his brother Eden - the second from the penalty spot - before Romelu Lukaku also got his name on the scoresheet.
The other match in the group saw Estonia lose 2-1 at home to Bosnia-Herzegovina as Izet Hajrovic scored twice for the visitors either side of Ilja Antonov's equaliser.