Newcastle have their sights on the Uefa Cup quarter-finals after a stunning four-goal burst, although AZ Alkmaar grabbed two vital away goals.
Dyer celebrates Newcastle's second goal against AZ Alkmaar
The Magpies took the lead through Gretar Steinsson's own goal before Kieron Dyer clipped home a second.
Obafemi Martins then found the net after a mazy dribble before Shota Arveladze pulled one back for Alkmaar.
Martins fired in his double but Danny Koervermans' penalty gave the Dutch side hope for next week's second leg.
Alkmaar, who have scored 21 goals since the first round to become the top scorers in the Uefa Cup this season, looked dangerous early on and showed glimpses of their technical excellence.
But they were never allowed to settle by Glenn Roeder's side, who carved out a great early chance through Damien Duff.
The Republic of Ireland winger played a one-two with Martins and flashed a drive across the face of the visitors' goal, which Antoine Sibierski just failed to get his foot to.
But the breakthrough came from the same flank when Duff's clever back-heel freed Dyer down the left and his cross forced Icelandic defender Steinsson to flick the ball into his own net in the eighth minute.
The home side made it 2-0 in the 22nd minute when Sibierski flicked Nicky Butt's pass on to Dyer, who calmly lifted his shot over advancing keeper Boy Waterman.
St James' Park was sent into dreamland within a minute when Martins added a third goal, as Louis van Gaal's side seemed unable to deal with the pace of the Newcastle front-line.
Magpies keeper Shay Given was called upon for the first time when he was forced to block a fine 18-yard drive from Maarten Martens.
But there was nothing Given could do as Julian Jenner crossed from the right and former Rangers frontman Shota Arveladze arrived late to head home off the underside of the crossbar on 31 minutes.
Sibierski tested Waterman with a low, left-foot drive 11 minutes before the break but the hapless Alkmaar were beaten again on 37 minutes when Martins thumped Nolberto Solano's cross into the bottom corner as Newcastle went in at half-time with a 4-1 advantage.
The second half started in the same breathless manner, with Alkmaar throwing caution to the wind in search of another goal, and Titus Bramble was forced into a superbly timed tackle to deny a one-on-one for Koervermans.
But the tie was turned on its head when Steven Taylor contrived to handball a cross from substitute Moussa Dembele.
Dembele saw his tame penalty well parried by Given but Koervermans followed up like an express train to force home the rebound and take that crucial second away goal.
Martins could have regained a three-goal advantage for his side but his lacklustre shot when clean through on goal was well blocked by Waterman.
Newcastle: Given, Bramble, Taylor, Carr, Solano, Dyer, Parker, Butt, Duff (Emre 77), Sibierski (Milner 65), Martins.
Subs Not Used: Harper, Luque, N'Zogbia, Huntington, Carroll.
Goals: Steinsson 8 og, Dyer 22, Martins 23, 37.
AZ Alkmaar: Waterman, Steinsson, Jaliens, Opdam, De Cler, Jenner (Lens 65), De Zeeuw, Martens (Dembele 59), Boukhari (Luirink 83), Koevermans, Arveladze.
Subs Not Used: Bulters, Cziommer, Donk, Vormer.
Goals: Arveladze 31, Koevermans 73.
Ref: Massimo Busacca (Switzerland).