Clint Dempsey put Tottenham ahead in the 76th minute on a header that was later ruled an own goal and Spurs reached the knockout stage of the Europa League with a 3-1 win over Panathinaikos on Thursday.
Emmanuel Adebayor gave Spurs a 29th-minute lead as he beat the offside trap before firing into the bottom right corner. But Zeca headed Panathinaikos level nine minutes into the second half.
Tottenham restored its lead when Dempsey's header hit the underside of the crossbar and bounced in off goalkeeper Orestis Karnezis. Jermain Defoe later sealed the match.
"When you play with good players they will always create chances for the forwards to score," Defoe said. "It's been good - not just me and (Adebayor) — I think everyone played their part. Hopefully we can keep it going — it was a good victory."
For Liverpool, 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 RussIa 3-1, Liverpool won Group A. All three teams finished with 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.
In the other late game, FC Basel went through after a goalless draw at already-qualified Genk.
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, Marseille 0; Fenerbahce 0, Borussia Moenchengladbach 3; Bordeaux 2, Newcastle 0; and Maritimo 2, Club Bruges 1.
American midfielder Alejandro Bedoya gave visiting Helsingborgs a 2-0 lead when he scored in the 21st minute of a 3-1 win at Twente in a match between already eliminated teams.