Poland recovered from throwing away a two-goal lead in Warsaw to secure a first trip to the World Cup finals since 2006.
Paris: Robert Lewandowski scored a European qualifying record 16th goal as Poland defeated Montenegro 4-2 on Sunday to reach next year's World Cup, while reigning champions Germany secured a 10th successive win.
Bayern Munich striker Lewandowski struck again in what has been a remarkable qualifying campaign as Poland recovered from throwing away a two-goal lead in Warsaw to secure a first trip to the World Cup finals since 2006.
"I was angry. We were leading 2-0 at home and then let them equalise for 2-all. We had to score that third goal to calm things down," said Lewandowski, who moved back ahead of Cristiano Ronaldo's 15-goal tally.
Krzysztof Maczynski and Kamil Grosicki struck early as Poland made a dream start, but Montenegro hit back through goals from Stefan Mugosa and Zarko Tomasevic to pull level with just seven minutes left.
Lewandowski restored Poland's advantage on 85 minutes before a late own goal from Filip Stojkovic sealed victory, although Denmark's 1-1 draw at home to Romania ultimately rendered the outcome irrelevant.
"Congratulations to all the players who were able to hold on until the end," said Poland coach Adam Nawalka. "The players have proved themselves in difficult moments, hence our qualification and it's in very good style."
The Danes needed to win in Copenhagen while hoping that Montenegro could upset Poland to finish top of Group E, but Ciprian Deac's late equaliser cancelled out a 60th-minute penalty from Christian Eriksen.
However, Denmark are at least assured of a place in next month's play-offs as one of the eight best runners-up from the nine qualifying groups.
Germany made it 10 wins from 10 in Group C after routing Azerbaijan 5-1 in Kaiserslautern to join Spain as the only nations in history to finish a European World Cup qualifying campaign with a perfect record.
Leon Goretzka's opening goal was negated by Ramil Sheydaev on 34 minutes, but Sandro Wagner and Antonio Ruediger scored after half-time before Goretzka notched his second and Emre Can completed the victory.
Germany scored a European qualifying record 43 goals on the road to Russia, emulating Spain who achieved perfection in qualifying ahead of their triumph at the 2010 tournament in South Africa.
"It would be a mistake to use this qualifying campaign as a benchmark. Sure it was good, but the World Cup will be a different matter," said Germany coach Joachim Loew. "It will be hard to win the World Cup for a second time."