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 where they could face the Republic of Ireland.
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.
Robben announced his retirement from international football after the game.
The KNVB announced that the 33-year-old Bayern Munich winger, who has played 96 times for his country, was calling time on his Holland career shortly after Tuesday's home match against Sweden.
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.
The United States will miss their first World Cup since 1986 after a 2-1 defeat to Trinidad and Tobago - as Panama secured their debut appearance at the tournament next summer.
Bruce Arena's side started the day in pole position to secure the last of three qualifying spots, joining Mexico and Costa Rica in Russia, but a loss to the already-eliminated Trinidadians dashed hopes of an eighth straight appearance.
The US players sunk to the ground at the final whistle as other results in the group did not go their way.
Omar Gonzalez was put under pressure with a cross into the danger area and put the ball past Tim Howard on 17 minutes and Alvin Jones doubled the lead with a stellar long-range strike just before half-time.
Christian Pulisic got one back after the break, but the US pressure did not pay off.
The US were still sitting pretty as Costa Rica went ahead against Panama when Johan Venegas scored a cheeky dink on 36 minutes.
There was controversy for the equaliser - the referee judging Gabriel Torres's effort made it over the line despite protests from the Costa Ricans.
But there was no doubt about the winner on 88 minutes, when Roman Torres took the ball on the bounce and smashed it in from close range.
In the other group fixture, Honduras set up a tie against Australia with a 3-2 win over visitors Mexico in San Pedro Sula.
The home side found themselves 2-1 down at half-time, but an own goal from Guillermo Ochoa on 53 minutes and a Romell Quioto goal seven minutes later booked a two-legged play-off against the Socceroos in November.
Argentina overcame a scare to book their place in the World Cup finals after beating Ecuador away for the first time since 2001.
Jorge Sampaoli's side had Lionel Messi to thank - as his hat-trick rescued a side which found themselves 1-0 down in the first minute.
Argentina went into the clash needing a win to book a place at the finals in Russia - and Messi cancelled out Romario Ibarra's winner with an 11th minute strike.
Two more goals from Messi either side of half-time in Quito meant his side qualified for their 12th consecutive World Cup, finishing third in the group.
Uruguay cemented their second place in the group with a 4-2 win over Bolivia.
The home side scored all six goals in Montevideo with Gaston Silva and Diego Godin both finding their own net. Martin Caceres, Edinson Cavani and a brace from Luis Suarez sealed the three points.
Brazil were already sure of their place in Russia and swept to a convincing 3-0 win over Chile in Sao Paulo.
The visitors were also hopeful of heading to the finals, but Alexis Sanchez's side failed to fire on all cylinders as La Roja crashed out due to a late equaliser in the Peru v Colombia game.
Paolo Guerrero scored in the 74th minute in Lima after James Rodriguez was on target for Colombia.
The Peru goal helped push them into fifth place in the table on goal difference - with Chile falling to sixth - as they booked a two-legged play-off against New Zealand.
In the night's other fixture, Paraguay's slender hopes of playing in Russia next summer were dashed by bottom-of-the-table Venezuela, a Yangel Herrera goal on 84 minutes securing a 1-0 win.
:: SOUTH AMERICA
:: NORTH, CENTRAL AMERICA AND CARIBBEAN