BERLIN — Portugal and Northern Ireland booked their places at Euro 2016 on Thursday, while world champion Germany was made to wait after being upset 1-0 by Ireland in Dublin.
Irish substitute Shane Long ran onto a kick out over the German defense from goalkeeper Darren Randolph and blasted past Manuel Neuer to the top corner to ensure Group D will be decided on the final day.
Germany, Portugal and Ireland are vying for the top two spots to ensure direct qualification. Scotland's hopes were ended when Robert Lewandowski salvaged a 2-2 draw for Poland in Glasgow.
One hundred miles to the north in Belfast, Steven Davis scored twice for Northern Ireland to qualify for its first European Championship tournament with a 3-1 victory over Greece in Group F.
Joao Moutinho struck for Portugal to beat Denmark 1-0 and secure its place by winning Group I.
Here's a roundup of action from Thursday's Euro 2016 qualifying games:
Shane Long's strike earned Ireland at least a playoff place with a famous 1-0 win over Germany. Ireland had never before beaten Germany in a competitive game.
Germany had missed a host of chances through Jerome Boateng, Ilkay Gundogan and Mesut Ozil, with Ireland forced to chase the game for long periods before Long struck in the 70th minute.
Thomas Mueller missed the chance to equalize eight minutes later - a draw would have been enough for Germany - when he fired wide with the goal at his mercy.
"It's bitter for me and worse for the team," Mueller said.
With one game in qualifying remaining, Germany tops Group D on 19 points, one ahead of Poland and Ireland, which meet in Warsaw on Sunday.
Poland captain Lewandowski's second goal deep in injury time ended Scotland's hopes of a playoff.
Because of its superior goal difference, a draw on Sunday would be enough for Poland to qualify directly, while Ireland needs to win to avoid the playoffs.
Germany hosts already eliminated Georgia in Leipzig on Sunday, when a draw would be enough.
Earlier Thursday, Georgia defeated Gibraltar 4-0 in Tbilisi.
Cristiano Ronaldo's Portugal will be playing at Euro 2016 after beating Denmark 1-0, and Albania could still make it after a tense but violence-free 2-0 defeat against Serbia.
The match in Elbasan, central Albania, was watched over by more than 2,000 police, with extensive security checks and snipers on rooftops. A match last year between the countries was interrupted by violence after a drone carrying a nationalist Albanian banner hovered over the pitch.
In the end, Thursday's drama came on the pitch as Serbia captured a late win with injury time goals from Aleksandar Kolarov and Adem Ljajic.
Portugal ensured the group's top spot thanks to Joao Moutinho's 66th-minute strike in northern Portugal.
Denmark stayed second on 12 points, six behind Portugal, and could still advance, though the Albanians on 11 points have one game left to play while the Danes have completed their eight group matches.
Two goals from captain Steven Davis and another from Josh Magennis guaranteed Northern Ireland a place in France in June with victory over Greece.
"It's a dream come true. We really wanted to get it done tonight and there is no better place than to do it in front of your home fans," Davis said. "It's a huge achievement for the squad and the entire nation.
Davis opened the scoring from close range in the 35th minute, with Magennis doubling the hosts' lead shortly after the interval.
Davis added a third in the 58th when he sent a header into the far corner following a corner to send Windsor Park into raptures. Hristos Aravidis netted a consolation for Greece with four minutes remaining.
The win moves Northern Ireland onto 20 points, three ahead of second-placed Romania following its 1-1 draw against Finland in Bucharest.
Hungary came from behind to beat the Faroe Islands 2-1 in Budapest courtesy of two second-half goals from substitute Daniel Bode.
That win secures at least a third-placed finish for the Hungarians, now on 16 points, one adrift of Romania.
Barry Hatton contributed from Lisbon, David Gerges from London.