Former skipper Kevin Nolan returned to haunt his old club as West Ham won 1-0 and condemned Newcastle to a first defeat in six games.
Nolan's 39th-minute strike, so typical of the goals he once scored for the Magpies, was enough to edge a tight encounter in which the visitors enjoyed the better of the first half but had to survive a stern examination after the break.
Newcastle were once again far from their best, but did create more than enough chances to get something out of the game and would have done but for some poor finishing and the resilience of goalkeeper Jussi Jaaskelainen, who produced fine saves from Demba Ba and Hatem Ben Arfa.
Opposite number Tim Krul prevented Andy Carroll from opening his West Ham account with a 72nd-minute save but it was Sam Allardyce, who was sacked by Newcastle after just eight months at the helm, smiling as his successor Alan Pardew was left to bemoan another disjointed display.
There was little to choose between the sides and even less to recommend the game for much of the opening period, with both teams struggling to find a telling final ball. Matt Jarvis fired high and wide at one end and Papiss Cisse was similarly wasteful at the other but neither goalkeeper was tested until 25 minutes had elapsed.
Even then, Jaaskelainen had little difficulty in collecting Yohan Cabaye's dipping long-range effort and the game looked to be heading into the break in stalemate until an explosive final few minutes.
The visitors forced their way ahead with six minutes of the half left to play when full-back Davide Santon could only head Mark Noble's left-wing cross out to full-back Joey O'Brien, who looked to have dragged his right-foot shot harmlessly across the face of goal. However Nolan turned up in exactly the right place to divert it past Krul.
The 30-year-old should have doubled the lead within two minutes when he was played in by midfielder Mohamed Diame, but guided his left-foot shot wide of the post. Newcastle finally responded as Ben Arfa saw an injury-time effort deflected into the side-netting and Jaaskelainen got down well to parry Cabaye's well-struck effort.
The Finn came to his side's rescue once again within two minutes of the restart when he somehow managed to claw Ba's header away after O'Brien's attempted clearance had dropped nicely for him. The home side might have fallen further behind had substitute Gary O'Neil made more of a free header from Nolan's 59th-minute cross.
Half-time substitute Shola Ameobi headed just wide from Cabaye's 69th-minute corner and Jaaskelainen pulled off a fine stop to keep out Ben Arfa's drive two minutes later. Krul blocked bravely to deny Carroll a first goal for his latest club as the Londoners staged a breakaway with Nolan providing a tailor-made final ball.