RB Leipzig's Champions League debut ended in a 2-1 home loss to Group G winner Besiktas on Wednesday.
Just when Naby Keita thought he'd salvaged a draw for the home side, Brazilian midfielder Talisca scored with a half-volley in the final minute to ensure Besiktas stayed unbeaten.
It's the first time Besiktas have reached the round of 16.
Leipzig's hopes of progress depended on a favour from Monaco at Porto, who went through as group runner-up after beating the French side 5-2. Leipzig could only go through if they secured more points than the Portuguese team.
It started badly for the Bundesliga side when Alvaro Negredo fired the visitors ahead with a penalty conceded by Leipzig captain Willi Orban for bringing down Jeremain Lens.
The home side's hopes of progress were made worse with the news that Porto had already taken the lead at home against Monaco.
Timo Werner thought he equalised some 10 minutes later, when the linesman's flag stayed down. Referee Viktor Kassai ruled the goal out for offside after consulting him, however. TV replays showed it was the correct decision.
Jean-Kevin Augustin went close to an equaliser after the break, Keita tried his luck, and Werner brought the best from Tolga Zengin. The Besiktas goalkeeper and captain produced a host of saves to keep his side in front.
Leipzig's Stefan Ilsanker was sent off for his second yellow card, then Keita made the breakthrough with three minutes remaining.
By then, however, Porto were all but assured of second place in the group.
Talisca completed a frustrating night for the Bundesliga outfit, who have to be content with Europa League football. Monaco finished bottom of the group.