London: AZ Alkmaar suffered a first European home defeat in their history and were eliminated from the UEFA Cup on Thursday after a 3-2 loss to Everton.
The Dutch side had gone 32 games unbeaten at home in Europe since entering European competition in 1977 but James Vaughan hit a 79th-minute winner as the Premier League side ended the group stage with maximum points from their four games.
Nuremberg sealed their place in Friday's first knockout round draw, taking the German contingent in the last 32 to five teams, by beating Larissa 3-1 to finish second to Everton in Group A.
AZ's defeat sent Russian champions Zenit St Petersburg through.
Fiorentina, AEK Athens, Brann Bergen and Aberdeen also progressed.
An entertaining clash at AZ's DSB Stadium was sparked by a goal after just 64 seconds when Everton's England striker Andy Johnson showed tenacity to fire home.
AZ hit back after 17 minutes, Italian striker Graziano Pelle shooting first time past keeper Stefan Wessels from Gretar Steinsson's pass but Everton regained the lead just before halftime when Phil Jagielka headed in from close range after Joleon Lescott's effort was cleared off the line.
Kew Jaliens outjumped Lescott to head home a corner on 65 minutes to make it 2-2 only for Vaughan to find the net from close range 11 minutes from time.
"They all performed really well against a good AZ side," Everton manager David Moyes told Channel Five TV.
"I think we're getting stronger as we go along. We've not won anything but that takes time."
Goals from Adrian Mutu and Christian Vieri sealed Fiorentina's passage from Group C after a 2-1 win over Mlada Boleslav eliminated the Czech side.
Villarreal finished top of the group after a 2-1 win away at AEK Athens extended the Spanish side's unbeaten run in UEFA Cup away games to nine since losing 1-0 at Valencia in the 2003-04 semi-finals.
Dane Jon Dahl Tomasson netted a 69th-minute winner with a left-footed strike.
AEK still went through as the third-placed side.
Aberdeen, with two goals from Jamie Smith, thumped FC Copenhagen 4-0 at Pittodrie to seal the final qualifying spot in Group B.
Atletico Madrid finished top ahead of Panathinaikos after a the Spaniards snatched a 2-1 win over the Athens side with a goal from Simao in the sixth minute of stoppage time.
Atletico finished with 10 men after Raul Garcia's red card nine minutes from time.
Group winners will play the third-place finishers in the last 32 in February, playing the second legs at home, while the runners-up face one of the demoted Champions League sides. The final is in Manchester on May 14.