New boy Jonjo Shelvey helped Newcastle United climb out of the relegation zone this afternoon.
Shelvey had a hand in both goals as Steve McClaren's side beat West Ham United 2-1 at St James's Park.
Ayoze Perez and Georginio Wijnaldum netted first-half strikes for Newcastle.
But a goal early in the second half from visiting substitute Nikica Jelavic led to a nervy finale.
The result saw Newcastle – who had moved leapfrogged Sunderland before kick-off time after Sam Allardyce's side lost 4-1 to Tottenham Hotspur at White Hart Lane – climb up above Swansea City and into 17th place.
Henri Saivet, Shelvey's fellow new signing, came off the bench to make his debut after Paul Dummett suffered a second-half injury.
Shelvey, signed this week from Swansea, must now wait to find out if he will face retrospective action for an off-the-ball challenge on Enner Valencia that went unpunished by referee Neil Swarbrick.
It is not clear if Swarbrick saw the incident.
Shelvey found Wijnaldum with a superb pass in the sixth minute, and Perez beat Adrian with a first-time finish from his lay-off.
And the midfielder also set in motion the move for Newcastle's second goal, scored in the 15th minute.
Daryl Janmaat broke down the right and crossed for Wijnaldum, who beat Adrian from close range.
Shelvey clashed with Valencia late in the first half.
A poor backpass from Chancel Mbemba saw Jelavic halve the deficit in the 49th minute.
But Newcastle – who had been dominant before the break – somehow held on to take all three points.
NEWCASTLE UNITED: Elliot; Janmaat, Mbemba, Coloccini, Dummett (Saivet, 56); Colback, Shelvey; Sissoko Wijnaldum; Perez (Gouffran, 80), Mitrovic (Lascelles, 90). Subs not used: Darlow, Aarons, Toney, Riviere.
WEST HAM UNITED: Adrian, Tomkins (Jenkinson, 75), Collins, Ogbonna, Cresswell, Obiang (Jelavic, 46), Noble, Kouyate, Antonio (Moses, 70), Payet, Valencia. Subs not used: Randolph, Reid, Song, Cullen.
Goals: Perez 6, Wijnaldum 15, Jelavic 49
Booking: Elliot 90
Referee: Neil Swarbrick (Preston)