Mark Viduka helped sink West Ham with a double salvo on an afternoon that once again saw Michael Owen go off injured amid fears that he requires a hernia operation.
Viduka struck twice in the first half from Charles N'Zogbia crosses and N'Zogbia then rounded off the scoring after the impressive Dean Ashton had earlier levelled it up for the Hammers.
But perhaps the day's proceedings were put into perspective with a minute's applause just before the game from fans and players in memory of 15-year-old Academy player Jordan Thompson, who died last week after a long illness.
After an early shock, Newcastle stormed in front in the second minute with Viduka's first goal at St. James' Park.
Yet it was the Hammers could have already been ahead when a poor Steve Harper clearance dropped to United old boy Lee Bowyer, who had a shot blocked and Carlton Cole put the rebound over.
Newcastle burst straight upfield and went in front. N'Zogbia worked a one-two with James Milner and crossed for Viduka to lose Anton Ferdinand and power a header beyond Robert Green.
West Ham worked their way back into contention and Mark Noble cutting in from the left brought an excellent save from Harper.
The visitors severely tested United's lack of height in defence with high balls and it paid dividends after 32 minutes. A long Lucas Neill throw was won by Ashton and was headed back to him from Cole and the Hammers' number nine volleyed into the net from six yards.
Ashton's equaliser lasted just nine minutes before the N'Zogbia-Viduka combination doubled up again to restore the home side's lead.
N'Zogbia outpaced Bowyer down the left and whipped in a back-post cross that the alert Viduka bundled over the line.
West Ham had both Hayden Mullins and Cole booked in a five-minute spell early in the second half, while sandwiched in between Owen limped off injured again, with what appeared a recurrence of his troublesome groin injury adding to the fears that he requires a hernia operation.
David Rozehnal flashed a 25-yarder just wide of Green's far post and then Viduka showed excellent skills to tee up the magnificent Nicky Butt, whose shot was well saved.
At the other end Noble brought another good save from Harper before Allardyce made a timely substitution after 73 minutes with Jose Enrique going on for Viduka.
Enrique slipped in at left-back, allowing N'Zogbia to move into midfield and Alan Smith to join substitute Obafemi Martins up front.
And within three minutes it was a switch that worked a treat as N'Zogbia played in Martins on the left and was on hand to bundle in his cross to take the Frenchman to three goals, level with Viduka.
By then West Ham were a spent force and should have leaked a fourth when Martins broke clear to round Green, but fired into the sidenetting.