Eintracht Frankfurt staged a second-half comeback, scoring twice in 10 minutes to beat the hosts Sporting 2-1 on Tuesday and qualify for the Champions League last 16 for the first time, knocking the Portuguese club out of the competition.
Sporting needed only a point to advance and they took the lead when the winger Arthur Gomes volleyed in at the far post after a looping cross was headed on in the 39th minute.
Eintracht, the Europa League champions last season, hardly got a look-in during the first half but came out fighting after the break, needing a win to secure a top-two finish.
A handball by the Sporting captain, Sebastian Coates, in the 62nd minute gave Frankfurt a penalty and Daichi Kamada drew them level with a well-taken spot-kick.
The France international Randal Kolo Muani then powered into the box and drilled home the winner 10 minutes later to complete their comeback and secure second place behind Tottenham in Group D.
Bayern Munich completed a perfect group stage by beating fellow qualifiers Internazionale 2-0 thanks to goals from Benjamin Pavard and Eric Maxim Choupo-Moting in their final Group C game.
Bayern ended top on 18 points, eight ahead of second-placed Inter with both teams having already reached the knockout stage.
In Pilsen, Ferran Torres scored in each half as Barcelona eased past Viktoria Plzen 4-2 but both sides were already eliminated from the competition. Barcelona remained in third place in Group C behind Bayern and Inter and will drop into the Europa League. Plzen ended their European campaign without a point.
Barcelona, who rested a number of regulars including Robert Lewandowski, struck six minutes into the match when the defender Marcos Alonso poked the ball over the line.
The visitors doubled the lead just before the break when Jordi Alba deftly nodded the ball to the feet of an unmarked Torres who calmly slotted the ball into the net for a goal initially ruled out before a VAR review.
The Czech champions briefly cut the deficit in half when Tomas Chory converted a penalty after winning a spot-kick in the 51st minute before Torres nabbed his second of the night on the break minutes later.
Plzen responded with a glancing Chory header in the 63rd minute to potentially set up a nervy finish until Pablo Torre slammed a shot into the roof of the net on his Barcelona debut to wrap up the victory.
Goals from Mehdi Taremi and Stephen Eustáquio helped Porto to secure a 2-1 win at home against Atlético Madrid to finish top of Group B.
Porto had already qualified for the last 16 but leapfrogged Club Brugge to finish as group winners with 12 points, one point ahead of the Belgian club who also went through. Atlético finished last, failing even to qualify for the Europa League knockout round playoffs.
Porto went ahead in the fifth minute when the forward Taremi tapped in a cross from Evanilson, registering his fifth goal in the Champions League this season.
The midfielder Eustáquio doubled Porto’s lead in the 24th minute, drilling the ball into the bottom corner after Galeno sprinted down the left and played a cross inside the box.
Atlético’s Antoine Griezmann found the net in the 68th minute but the referee had already blown the whistle for a foul from Rodrigo De Paul on Galeno in the build-up, while the Porto keeper Diogo Costa saved a shot from Angel Correa six minutes later.
The Porto defender Ivan Marcano scored an own goal in added time, but it did not do much damage to Porto who went on to seal three points.
Club Brugge finished second in their Champions League group after failing to win at Bayer Leverkusen, drawing 0-0 in their final Group B game.
Brugge had already qualified for the round of 16 in February following their first four games after emerging as the surprise package of the Champions League group campaign.
But a 4-0 defeat at home against Porto last week and the draw at the Bay Arena on Tuesday meant they ended on 11 points from their six games, one behind Porto.
Leverkusen finished third to take a Europa League place ahead of Atletico on their head-to-head results against the Spanish club.
Brugge came closest to victory when their Canada international Tajon Buchanan struck the upright shortly after half-time although Leverkusen were the more attacking and forced visiting goalkeeper Simon Mignolet to make some key saves. Mignolet kept five clean sheets in the six group games.