Chelsea qualified for the final 16 of the Champions League despite losing again to Basel. AC Milan and Arsenal won, but did not yet advance.
Mohamed Salah's late goal Tuesday earned Basel a 1-0 win and a second straight Group E victory over the 2012 champions. But Chelsea is guaranteed a top-two finish after Schalke drew with Steaua Bucharest.
Milan cruised past Celtic 3-0, but needs a point against Ajax in its last match after the Dutch side upset already-qualified Barcelona 2-1 to keep alive its hopes. It was the first loss for Barca after a 25-game unbeaten streak dating back to last May's loss to Bayern Munich in the Champions League semifinals.
Arsenal also requires another point after beating Marseille 2-0 in Group F. Napoli lost 3-1 to Borussia Dortmund to leave both teams three points behind the English side.
Chelsea sailed through its group with three straight victories since opening up with a 2-1 home loss to Basel. It knew a point would be enough to advance and that appeared to hold back manager Jose Mourinho's team, which failed to have a shot on goal before Salah sprinted clear of Chelsea's defense to clip a left-footed shot over advancing keeper Petr Cech in the 87th minute.
''I did not like anything from the first minute,'' Mourinho said. ''A bad performance, a deserved defeat. But because of other results, we qualify.
Mourinho's team joined Barcelona, Bayern Munich, Manchester City and Atletico Madrid in the round of 16. ''That is the only positive thing from this night.''
As the holder, Chelsea failed to reach the knockout stage last year, albeit from a much harder group than this season.
Arsenal finishes group play against Napoli and will advance for the 14th straight season by avoiding a three-goal defeat in Italy.
''It's an interesting one, a difficult one, but we have played other difficult games away from home against difficult opponents and have done well, so that's what we have to put in our mind,'' Arsenal manager Arsene Wenger said.
In Group G, Zenit St. Petersburg and FC Porto were left to compete for the second qualification spot behind Atletico after both earned 1-1 draws.
Zenit relied on a 74th-minute own goal by Atletico defender Toby Alderweireld to hold the Spanish side in Russia and stayed a point ahead of Porto, which also scored a second-half equalizer, by Jackson Martinez, to draw with Austria Vienna.
Six months after losing to Bayern in the final, Dortmund wouldn't have gotten out of its group if it had lost to Napoli. But Marco Reus' penalty kick and scored by Jakub Blaszczykowski and Pierre-Emerick Aubameyang revived the German side's hopes.
''It was a match to remember,'' Dortmund coach Juergen Klopp said.
Dortmund completes the group with a trip to Marseille, which is seeking to avoid a sixth straight defeat after falling at Arsenal courtesy of goals by Jack Wilshere. His first came after just 29 seconds before adding another in the 65th minute.
It will be a winner-takes-all match at the San Siro in two weeks as Milan's victory in Glasgow was matched by Ajax's surprise triumph over Barca.
Kaka and Cristian Zapata pounced on poor defending of corner kicks by Celtic to score in the 13th and 49th minutes for Milan. Italy striker Mario Balotelli wrapped up victory in the 59th.
Meanwhile, Barcelona's unbeaten run finally came to an end in Amsterdam.
Ajax took a two-goal lead by halftime on goals by Thulani Serero and Danny Hoesen, but was forced to hang on for the three points after Joel Veltman was sent off for bringing down Neymar in the area, earning Barcelona a penalty kick. Xavi Hernandez calmly converted it.
''You can only dream about this,'' Hoesen said. ''They are probably the best team in the world and to be able to score the winning goal is amazing.''
Barca was missing the injured Lionel Messi and fielded a makeshift backline with fullbacks Jordi Alba and Dani Alves and goalkeeper Victor Valdes also absent.
The Champions League resumes Wednesday, when Real Madrid, Paris Saint-Germain and Manchester United all can qualify.