LONDON -- Bayer Leverkusen, Livorno, Osasuna, Lens and Sporting Braga captured the last five spots in the knockout round of the UEFA Cup on Thursday.
Leverkusen needed late goals to knock out Besiktas 2-1, while Livorno won 1-0 at Auxerre to eliminate the French club. Osasuna scored a 3-0 victory at group winner Parma, Braga beat Grasshoppers 2-0 to knock out Slovan Liberec and Lens advanced despite losing 1-0 at Dutch club Heerenveen.
The top three in each of eight groups qualified for Friday's knockout draw at UEFA headquarters at Nyon, Switzerland, and they will be joined by eight clubs who finished third in their Champions League groups.
Starting in last place in Group B, Leverkusen captured the third spot from Besiktas by beating the Turkish club 2-1 and eliminating the visitors. The German team qualified for Friday's draw with group winner Tottenham and second-place Dinamo Bucharest.
Until a goal by experienced World Cup player Bernd Schneider 12 minutes from the end, however, Leverkusen appeared to be going out. But Schneider scored from the rebound after a penalty kick by Mirko Babic had been blocked by goalkeeper Vedran Runje.
Sergej Barbarez added a second with 3 minutes to go. A penalty kick by Brazilian star Ricardinho in the final minute was the only response from Besiktas.
"We made it tense until the end," Leverkusen coach Michael Skibbe said. "We are having a not so great season in the Bundesliga and it was important to win this game and advance. We had many chances, it was a pity that we hadn't scored in the first half already."
Two goals by Jermaine Defoe and another by Dimitar Berbatov enabled Tottenham to cruise to a 3-1 victory over Dinamo Bucharest at White Hart Lane, with Dinamo getting a goal from Jean-Philippe Mendy in injury time.
Livorno was next to last when it went to Auxerre, but Cristiano Lucarelli's header in the 59th minute gave the Italian club a 1-0 victory that enabled it to jump above the French side and join group winner Rangers and second place Maccabi Haifa in the next round.
Osasuna won 3-0 at Parma, which had already guaranteed itself of first place in Group D. Midfielder David Lopez scored twice in the first half and striker Juanfran added the third 8 minutes from the end.
Although Lens lost 1-0 at Heerenveen, the French club held on to third place on goal difference even though it wound up tied on points with the Dutch side and Denmark's OB Odense.
In a meeting of two teams that already had qualified from Group C, AZ Alkmaar came from behind to win 2-1 at defending champion Sevilla to top the standings.
The results mean that France and Spain have four teams each in the last 32, while England and the Netherlands have three.