Poland won their final qualifying match to claim the top spot in Europe's Group E and a ticket to the 2018 World Cup in Russia.
Two other sides who didn't win, Denmark and Northern Ireland, still managed to clinch second place in their respective groups and will take part in next month's play-offs to fill four of Europe's 13 World Cup berths, reports Efe news agency.
Slovakia, victorious on Sunday, finished second in their group as well, but will have to wait for the conclusion of group play to learn whether they will be among the eight play-off teams.
Poland started Sunday evening's match needing at least a home draw with Montenegro to be sure of controlling their own destiny, but jumped out to a 2-0 lead with a pair of first-half goals by Krzysztof Maczynski and Kamil Grosicky.
Montenegro pulled level with goals in the 78th and 83rd minutes, but Robert Lewandowski's record 16th marker in the qualifiers and an own goal by the visitors gave the hosts the 4-2 triumph and 25 points, five more than second-place Denmark.
The Danes, at home to Romania, led 1-0 on Christian Eriksen's successful penalty but ended up settling for a 1-1 draw after conceding a goal to Ciprian Deac.
More From This Section
Defending champions Germany, with first place in Group C already assured, pounded Azerbaijan 5-1 on Sunday to finish the qualifiers with 30 of 30 possible points, having allowed only four goals.
Eleven points back are Northern Ireland, who finished second despite falling 1-0 to fourth-place Norway.
England, who clinched first place in Group F last week, defeated Lithuania 1-0 with a goal by Harry Kane from the spot, while Slovakia prevailed in the battle for second place by beating Malta 3-0.
Though Scotland have the same number of points as the Slovaks, 18, the continental side have a better goal differential.
The Scots, who could have sealed second place with a victory, drew 2-2 Sunday with fourth-place Slovenia.
To reach the play-offs, Slovakia need either Wales or Croatia to do no better than a draw in their respective final matches, as the weakest of the nine second-place finishers is left out.
--IANS
ajb/bg
Disclaimer: No Business Standard Journalist was involved in creation of this content