Jonjo Shelvey denied West Ham a crucial victory in their fight for Premier League survival as Newcastle twice came from behind to snatch a point.
The Hammers, who boosted their hopes with a hard-fought 3-2 win over Chelsea in midweek, led 1-0 and 2-1 at St James' Park, but eventually emerged with only a point to show for their efforts in a 2-2 draw.
Michail Antonio's fourth-minute strike was cancelled out by Miguel Almiron and Tomas Soucek's 24 minutes from time by Jonjo Shelvey just seconds later with the Magpies stubbornly defending an unbeaten league run which now stretches to six games.
West Ham got off to the perfect start when Antonio's clever flick allowed Pablo Fornals to lay the ball into Jarrod Bowen's run down the right and after his cross had wrong-footed defender Jamaal Lascelles, Antonio lashed it into the roof of the net at the far post.
Keeper Lukasz Fabianski got down well at the other end six minutes later to turn away Dwight Gayle's deflected free-kick after the striker had attempted to drill it under the defensive wall, but he was beaten with 17 minutes gone.
Joelinton, Gayle and Allan Saint-Maximin combined well to feed the ball into the path of overlapping full-back Emil Krafth, and his driven cross allowed the fast-arriving Almiron to slide in ahead of the keeper and prod home.
West Ham's response was impressive as, after weathering a spell of pressure, they took the game back to their hosts, who needed a good reaction save by Martin Dubravka to deny Bowen after he got his toe to Aaron Cresswell's skidding 32nd-minute strike from distance just in front of the keeper.
Saint-Maximin, who had been relatively well contained by the Hammers for much of the half, chanced his arm from distance after cutting inside past Bowen six minutes before the break, but Fabianski was more than equal to the task.
The home side resumed in positive mood, Almiron firing wide from distance three minutes into the half, and with Nabil Bentaleb - a 43rd-minute replacement for the injured Isaac Hayden - snapping into tackles in the middle of the field, it was they who looked the more likely to take the lead.
Hammers boss David Moyes replaced Manuel Lanzini with Mark Noble in the search for fresh impetus, and it arrived with 66 minutes gone when, after Declan Rice's header from Bowen's corner had crashed back off the crossbar, Soucek stabbed the rebound past Dubravka.
However, the lead lasted just seconds as Shelvey exchanged passes with Dwight Gayle inside the box and fired into the bottom corner, with Fornals playing him onside.
Although substitute Andriy Yarmolenko forced a late save from Dubravka, there were to be no late heroics.