Michael Smith had given the visitors a 1-0 lead in the seventh minute but a Serge Gnabry scored a hat-trick, Leon Goretzka got two and Julian Brandt was on target to give the hosts a convincing win.
It was a disappointing end for Michael O’Neill’s side but a route to the finals next summer still exists via the play-offs in March.
Kamil Grosicki grabbed an assist to help Poland round off their qualification campaign with an entertaining 3-2 home win over Slovenia.
The hosts needed just three minutes to break the deadlock, as Sebastian Szymanski’s shot from distance beat Slovenian goalkeeper Jan Oblak. However, Matjaz Kek’s team responded immediately through Tim Matavz, who tapped home Josip Ilicic’s pass from close range to make it 1-1 at half-time.
Ten minutes after the restart, Poland retook the lead through Robert Lewandowski. Though Slovenia equalised for a second time through Ilicic in the 61st minute, Poland had the decisive last word, as Lewandowski’s cross and Grosicki’s header allowed Jacek Goralski to score the winner nine minutes from time and secure top spot in Group G with 25 points.
Monday evening saw Markus Henriksen help Norway to claim a 2-1 win away in Malta in their final Group F fixture.
Henriksen played the full 90 minutes at the National Stadium in Malta, which saw Joshua King put the Norwegians ahead after only seven minutes, only for Paul Fenech to level the scores before the break.
Alex Sorloth ended Malta’s slim hopes of avoiding bottom spot in Group F through as the Norwegian forward netted the all-important goal that earned the Scandinavians all three points.
Like Northern Ireland, Norway still have the chance to qualify for Euro 2020 via the play-off route as Lars Lagerbäck’s side were the winners of Nations League Group C3.