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 who 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
It’s back-to-back perfect group stage records for Bayern.
Read more on FRANCE 24 English
Champions League: Barcelona, Atlético eliminated; Liverpool, Napoli advance
Messi and Mbappe both score twice as PSG beat Maccabi
Salah hat-trick helps Liverpool beat Rangers in Champions League