On a topsy-turvy night, Tottenham and Eintracht Frankfurt both came from behind to win their respective games and secure their places in the last 16 of the Champions League.
At halftime in the final round of group matches on Tuesday, Marseille and Sporting Lisbon were going through from Group D.
But instead it was their opponents which progressed as a stoppage-time winner from Pierre-Emile Højbjerg saw Tottenham beat Marseille 2-1 to top the group and Frankfurt won by the same score in Lisbon to secure second spot on its Champions League debut.
The top two finishers in the other groups on Tuesday had already been decided, although not necessarily the order.
Porto beat Atlético Madrid 2-1 to snatch top spot in Group B after Club Brugge was held to a 0-0 draw at Bayer Leverkusen.
Napoli kept hold of first place in Group A despite dropping its first points in the Champions League this season in a 2-0 loss at second-place Liverpool.
Bayern Munich did manage to progress with a perfect record as it beat Inter Milan 2-0 to make it six wins out of six. The four places in Group C had already been decided with Inter having secured second spot ahead of Barcelona.
FINAL DAY DRAMA
In a rare occurrence for a group, all four teams had entered the final round of games with a chance to advance.
And which teams would go through and in what order changed several times over the night.
But Højbjerg scored with the last kick of the game at Stade Velodrome for a goal that lifted Tottenham to the top of Group D above Frankfurt, which was in first place until the Denmark midfielder’s goal.
That goal also meant Marseille finished in last place and will have no involvement in European competition in the new year.
Clement Lenglet had headed in the equalizer for Tottenham in the 54th minute after a woeful first half from the English side which didn’t have a touch in the opposition penalty box before the break. Tottenham had fallen behind on the stroke of halftime when Chancel Mbemba headed in a corner.
Frankfurt also came from behind, with Kolo Muani scoring a 72nd-minute winner for the visitors. Arthur Gomes had put the hosts ahead in the 39th and Frankfurt equalized with a penalty kick converted by Daichi Kamada in the 62nd.
NO CONSOLATION
Atlético Madrid doesn’t even have the consolation of the Europa League playoffs.
The Spanish team was the heavy favorite to progress from its group but was left lamenting a last-place finish after losing at Porto, which secured top spot in Group B.
Few expected Porto to even advance after losing its first two Champions League matches this season but the Portuguese team had already secured its place in the last 16 with a match to spare.
And first-half goals from Mehdi Taremi and Stephen Eustáquio helped Porto win its fourth straight Champions League match to finish a point above Brugge.
Brugge’s Canadian winger Tajon Buchanan hit the crossbar in the opening seconds of the second half.
PERFECT AGAIN
It’s back-to-back perfect group stage records for Bayern.
Benjamin Pavard headed the German side in front in the first half and Eric Maxim Choupo-Moting sealed the win against Inter in the 72nd minute with his seventh goal in his past six matches.
Barcelona ended its disappointing Champions League campaign with a 4-2 win at Viktoria Plzeň, which — in contrast to Bayern — fell to its sixth straight defeat.
Ferran Torres scored twice and Marcos Alonso and teenager Pablo Torre grabbed a goal each for the Catalan club. The hosts got on the board with a pair of goals by Tomás Chorý.
NOT SO PERFECT
Napoli was looking to become the first Italian team since AC Milan in 1992 to have six straight wins in its group.
However, late goals from Mo Salah and Darwin Nunez ended the Italian side’s unbeaten start to the season in all competitions.
Liverpool finished level on points with Napoli but second on the head-to-head record after losing 4-1 in Italy in their Champions League opener.
Rangers was left with an unwanted record after losing 3-1 at home to Ajax, which secured a place in the Europa League’s qualifying playoffs.
Rangers finished Group A with six straight losses and a goal difference of minus 20 — the worst group stage record ever.