Liverpool is through to the knockout stage of the Europa League after exacting revenge and winning 1-0 at already eliminated Udinese on Thursday.
Jordan Henderson scored midway through the first half to help avenge the 3-2 loss to the Italian side at Anfield in October.
When Young Boys of Switzerland beat already-qualified Anzhi Makhachkala of Russa 3-1, Liverpool won Group A. All three teams finished on 10 points, but Liverpool had the best head-to-head record, followed by Anzhi.
Stuttgart also advanced despite an embarrassing 1-0 defeat at home to Molde. It was runner-up to Group E winner Steaua Bucharest after the Romanian side drew 1-1 at Copenhagen. Stuttgart edged Copenhagen on head-to-head.
Udinese had a couple of decent chances before Liverpool took the lead in the 23rd minute with its first real opportunity. Luis Suarez headed on a corner and Suso passed it back for Henderson to rifle in through a crowd.
Former Liverpool goalkeeper Daniele Padelli pulled off several fantastic saves - denying Henderson and Suarez - to keep qualification still in question for Liverpool, which knew it had to at least match Young Boys' result.
Udinese's Giovanni Pasquale was sent off late on for a second bookable offence.
It almost went badly wrong for Liverpool in stoppage time as Antonio Di Natale sent a shot skimming over the crossbar with the last kick of the game.
In Switzerland, Gonzalo Zarate gave Young Boys the lead in the 38th when his initial shot ricocheted around the area and back to him to slot home from a tight angle.
Anzhi Makhachkala leveled in first-half stoppage time with a controversial equalizer. Young Boys called loudly for offside but Odil Ahmedov appeared to be level as he received the ball, turned and fired in.
Moreno Costanzo doubled Young Boys' lead eight minutes after the break after Anzhi failed to deal with a cross.
Anzhi striker Lacina Traore was sent off 20 minutes from time for a second bookable offence before Alexander Gonzalez added a third for the home side in stoppage time.
In the tight Group E, Steaua only needed a point to advance and was reduced to 10 men at the start of the second half when Cristian Tanase was sent off for a second yellow card.
Raul Rusescu gave it the lead with a stunning shot from outside the area which took a slight deflection as it curled into the right side of the goal.
Copenhagen leveled three minutes from time through Igor Vetokele, but it was too little too late.
At Stuttgart, Davy Claude Angan ran from inside his own half to score the only goal in first-half stoppage time for Norway's Molde.
Only two other berths were open to make the last 32. In the late games, Tottenham and Panathinaikos were vying for a spot in Group J, and FC Basel and Videoton were racing for the last spot in Group G.
Elsewhere, competition top-scorer Edinson Cavani scored his seventh in Napoli's 3-2 loss at home to PSV Eindhoven. Tim Matavz netted a hat trick to inflict Napoli's first home defeat in European competition in 18 years.
Also, defending champion Atletico Madrid lost 1-0 at Plzen.
In other results, it was; Dnipro 4, AIK Solna 1; Hapoel Tel-Aviv 2, Academica 0; Limassol 3, Marselle 0; Fenerbahce 0, Borussia Moenchengladbach 3; Bordeaux 2, Newcastle 0; and Maritimo 2, Club Bruges 1.