French side Auxerre were the biggest casualties on the final night of UEFA Cup group stage action.
Auxerre missed the chance to secure third place in Group A as they lost 1-0 at home to Livorno, who leapfrogged the Burgundy club with the victory.
Cristiano Lucarelli got the only goal of the game moments before the hour mark to settle what was a tense match at the Stade de l'Abbe-Deschamps.
Another Ligue 1 side, Lens, had a less-than-enjoyable evening but progressed to the last 32 by the skin of their teeth.
Francis Gillot's team went down 1-0 at Heerenveen, but advanced by virtue of having conceded one goal less than Danish outfit Odense.
The only goal of Thursday's match came in the last minute as Afonso Alves found the net with a stunning free-kick to earn Heerenveen their first and only win in this year's competition.
The Dutch team crash out despite their win as they needed to triumph by three clear goals to secure third place in Group D.
The top two places in the group were taken by Parma and Osasuna, with the Primera Liga outfit earning second place with a 3-0 thrashing of a weakened Parma side in Italy.
Osasuna took full advantage as David Lopez Moreno scored twice before being substituted, and it was his replacement Juanfran who added the third in the closing stages.
Rangers secured top spot in Group A with a 1-0 win over Partizan Belgrade in Glasgow.
Tottenham made sure of top place in Group B with a comfortable 3-1 win over Dinamo Bucharest at White Hart Lane.
Dinamo finished second in the group while Bayer Leverkusen claimed third place with a 2-1 win at home to Besiktas.
Bernd Schneider opened the scoring for the hosts late on to kick-start a busy 12-minute spell that saw another two goals fly in before the final whistle.
Sergej Barbarez doubled the hosts' advantage inside the last 10 minutes before Ricardinho's injury-time penalty brought scant consolation for Besiktas, who crash out of Europe after finishing fourth in the group.
AZ Alkmaar finished top of Group C after an impressive 2-1 away win over defending champions Sevilla.
The Dutch side came from behind and snatched victory as Shota Arveladze scored the second of his two goals in injury time.
The Georgian had already cancelled out Ernesto Chevanton's 50th-minute penalty, which looked to have put Sevilla on course to win Group C.
Braga wrapped up the final place in the next stage with a 2-0 win over Grasshoppers, who had already been eliminated.