Paris (AFP) - Pierre-Emile Hojbjerg scored a 95th-minute winner as Tottenham Hotspur came from behind to beat Marseille 2-1 and reach the Champions League knockout stage on Tuesday, where they were joined by Eintracht Frankfurt after their victory at Sporting Lisbon.
Liverpool ended Napoli's unbeaten start to the season with a 2-0 success at Anfield, but the Italian club did enough to finish top of Group A.
Atletico Madrid crashed out of Europe altogether with a loss to Porto, while Bayern Munich made it six wins from six matches by beating Inter Milan.
At a raucous Velodrome, Tottenham knew they would progress if they could avoid defeat by Marseille, although manager Antonio Conte had to watch from the stands after being red-carded in last week's dramatic draw with Sporting.
Spurs were camped inside their own half for the majority of the first period and fell behind just before the break when Chancel Mbemba headed in Jordan Veretout's cross after a quickly-taken corner.
The Premier League side were much improved after the restart and Clement Lenglet glanced in a 54th-minute equaliser.
Former Arsenal left-back Sead Kolasinac nodded a glorious late opportunity to send Marseille through wide.
He was made to pay as Hojbjerg struck on the counter as Spurs snatched top spot in the group and denied Marseille the consolation of a Europa League place.
"I just spoke with Antonio.He's tired because to watch from the crowd is not normal," Tottenham assistant coach Cristian Stellini told BT Sport."He wasted a lot of energy."
That Hojbjerg goal pushed Eintracht, who also won 2-1, down into second in Group D and kept Sporting in European competition.
Like Tottenham, Sporting only needed a point to qualify and they forged ahead six minutes before half-time as Arthur Gomes volleyed home at the back post.
But Frankfurt, playing in the competition for the first time since losing the 1960 European Cup final to Real Madrid, did not give up and Daichi Kamada scored a 62nd-minute penalty awarded for handball.
Randal Kolo Muani provided the winning moment, latching onto Ansgar Knauff's hooked pass and hammering the ball into the far corner.
The players celebrated wildly on the pitch after the Europa League holders' latest European exploit, with Sporting coach Ruben Amorim left looking stunned on the touchline.
"We didn't start well at the beginning of the game," said Frankfurt midfielder Sebastian Rode.
"But we are a comeback team, we gave everything in the second half and deservedly make the next round."
Liverpool down Napoli
Liverpool brought an end to Napoli's 21-game unbeaten run but could not win by four goals to take first place.
Both teams were already assured of a knockout-phase berth.
Liverpool put Saturday's surprise Premier League home loss to Leeds behind them, as late goals from Mohamed Salah, scoring in a fifth straight Champions League game, and Darwin Nunez gained a measure of revenge for the 4-1 loss in Naples in September.
"I would have really enjoyed the game even without the goals," Reds manager Jurgen Klopp said.
"We showed tonight a reaction.Being compact makes all the difference."
Ajax saw off Rangers 3-1 at Ibrox to inflict a sixth straight defeat in Group A on the Scottish giants.
Earlier, Atletico failed to finish third in Group B and drop into the Europa League as a 2-1 loss at Porto saw Bayer Leverkusen take third thanks to their goalless draw at Club Brugge.
Atletico, the 2014 and 2016 runners-up, were beaten by early goals from Mehdi Taremi and Stephen Eustaquio despite Ivan Marcano's stoppage-time own goal.
Bayern finished with a 100-percent record by seeing off Inter 2-0 at the Allianz Arena in Group C.
Benjamin Pavard headed home a corner and Eric Maxim Choupo-Moting crashed in his seventh goal in six games.
Barcelona's bitterly disappointing tournament came to an end with a 4-2 victory at bottom club Viktoria Plzen.
Barca will have to settle with being one of the favourites to win the Europa League.
"We're one of the candidates, the Europa League is looking like a good competition, the objective is to reach the end and win it, compete for it," said coach Xavi Hernandez.
Ferran Torres scored a brace, with Marcos Alonso and teenage midfielder Pablo Torre also on target.