Napoli earned a thrilling 3-2 home win over Leicester City on Thursday to reach the Europa League knockout stages as Group C runners-up behind Spartak Moscow.
Spartak won 1-0 at Legia Warsaw to secure an automatic last-16 berth while Napoli face a play-off against one of the third-placed teams in the Champions League dropping into Europe's second-tier competition after the winter break.
Third-placed Leicester go into the third-tier Europa Conference League where they will enter a play-off with one of the competition's runners-up for a last-16 berth.
Adam Ounas fired Napoli into a fourth-minute lead with a crisp low shot and the Serie A side appeared to be in cruise control after Eljif Elmas made it 2-0 with a tap-in after unselfish work from Andrea Petagna.
Sloppy defending cost the home twice in quick succession before half-time, however, as Jonny Evans drilled in a loose ball in the 27th minute and Kiernan Dewsbury-Hall volleyed in the equaliser with his first goal for Leicester.
North Macedonia playmaker Elmas put Napoli back in front shortly after the break, taking a tame-looking cross past a static defence before he steered the ball past goalkeeper Kasper Schmeichel.
Spartak, who edged Napoli to top spot with a superior head-to-head record, advanced after their goalkeeper Alexander Selikhov saved a stoppage-time penalty with forward Zelimkhan Bakaev netting a 17th-minute winner at Legia.
Bakaev curled in a fine low shot from the edge of the penalty area but it was Selikhov who emerged as Spartak's hero, parrying Tomas Pekhart's spot-kick which would have knocked the Russian side out had the Czech forward scored.
Real Sociedad also booked a playoff berth as they finished runners-up in Group B thanks to a 3-0 home win over PSV Eindhoven which took the Spanish side above the 1988 European Cup winners.
Mikel Oyarzabal fired Sociedad ahead with a 43rd-minute penalty and added the second before Alexander Soerloth netted in stoppage time to complete a comfortable victory.