Match ends, Newcastle United 2, West Ham United 1.
Jonjo Shelvey made an impressive debut for Newcastle as he helped his side move out of the relegation zone with a win over West Ham.
Shelvey had a hand in both goals as Ayoze Perez curled in a low shot before Georginio Wijnaldum side-footed in from six yards to make it 2-0.
A stray backpass by Chancel Mbemba let Nikica Jelavic score for the Hammers.
Newcastle squandered a number of chances but held on for a first win in six league games.
Magpies striker Aleksandar Mitrovic produced a hard-working performance but was denied by Hammers keeper Adrian three times.
Missed opportunities almost cost the home side, but keeper Rob Elliot kept out a 90th-minute Cheikhou Kouyate header with his knee.
How good was Shelvey?
Very good. The 23-year-old midfielder, signed for £12m from Swansea, showed the kind of passing, creativity and energy which helped him break into the England squad earlier this season.
With just six minutes on the clock, Shelvey found Wijnaldum, who laid the ball off for Perez to open the scoring.
The new signing then helped set up his side's second with a raking 60-yard ball to Daryl Janmaat, who crossed for Wijnaldum to score his ninth Magpies goal of the season.
Victory moved Newcastle out of the relegation zone at the expense of Swansea, where Shelvey said he had been "hung out to dry".
"I've enjoyed every minute I've been up here," said Shelvey. "It's nice to get out there and show what I am about.
"It's not about me. It is about the team. We are out of the relegation zone and it's onwards and upwards from here.
"I'm very shocked this team is in and around the relegation places. Normally it is hard coming into a new team and slotting straight in, but credit to the players and staff here."
McClaren finally beats Bilic
Steve McClaren was cruelly dubbed the 'wally with the brolly' when his England side were beaten by a Croatia team managed by Slaven Bilic in 2007.
That defeat ended England's hopes of qualifying for Euro 2008, and McClaren duly lost his job.
Bilic also came out on top when the Hammers won the reverse fixture earlier this season, but McClaren deservedly emerged victorious this time.
The visitors were overwhelmed in the first half and, despite improving after the break, would have been beaten more convincingly had it not been for Adrian.
Man of the match - Jonjo Shelvey
'It shouldn't have been close'
Newcastle manager Steve McClaren: "They must have gone in at half-time thinking 'wow, get in' because it was only 2-0.
"Then we gifted them a goal, but we didn't get nervous. We kept playing, we had chances that we didn't take but defended well and saw the game through.
"Jonjo is a very, very good player with real potential and it will suit him playing in this team, a team of footballers."
West Ham boss Slaven Bilic: "They scored two goals very early and it gave them confidence, but from the first minute of the game they were getting to second balls and looked hungrier, sharper, quicker.
"In the second half, we improved a lot. In the end we could have nicked a point when we had a great chance to equalise. But, overall, they deserved to beat us."
The stats you need to know
- West Ham have won just one of their past 13 Premier League trips to St James' Park (W1 D5 L7).
- All nine of Wijnaldum's league goals this season have come at St James' Park.
- Perez has scored in four of Newcastle's five Premier League wins in 2015-16.
- Newcastle attempted 23 shots (including blocked) in this match - their highest tally in a single Premier League game this season and the most they have had in a top-flight game since September 2014.
- Jelavic scored his first Premier League goal for West Ham and his first in the competition since February 2015.
Newcastle are away at Watford on 23 January, while West Ham play host to Manchester City on the same day.
- 21ElliotBooked at 90mins
- 3DummettSubstituted forSaivetat 57'minutes
- 17PérezSubstituted forGouffranat 80'minutes
- 45MitrovicSubstituted forLascellesat 90+5'minutes
- 5TomkinsSubstituted forJenkinsonat 75'minutes
- 14ObiangSubstituted forJelavicat 45'minutes
- 30AntonioSubstituted forMosesat 70'minutes
- 11E Valencia
- Neil Swarbrick
- Shots on Target
Second Half ends, Newcastle United 2, West Ham United 1.
Yoan Gouffran (Newcastle United) wins a free kick in the defensive half.
Foul by Angelo Ogbonna (West Ham United).
Attempt saved. Yoan Gouffran (Newcastle United) right footed shot from outside the box is saved in the centre of the goal. Assisted by Georginio Wijnaldum.
Corner, Newcastle United. Conceded by Angelo Ogbonna.
Substitution, Newcastle United. Jamaal Lascelles replaces Aleksandar Mitrovic.
Attempt missed. Jonjo Shelvey (Newcastle United) right footed shot from outside the box is high and wide to the right. Assisted by Georginio Wijnaldum.
Attempt saved. Aleksandar Mitrovic (Newcastle United) right footed shot from a difficult angle on the left is saved in the centre of the goal. Assisted by Fabricio Coloccini.
Foul by Moussa Sissoko (Newcastle United).
Mark Noble (West Ham United) wins a free kick in the defensive half.
Attempt missed. Jack Colback (Newcastle United) left footed shot from outside the box is close, but misses to the left. Assisted by Georginio Wijnaldum.
Robert Elliot (Newcastle United) is shown the yellow card.
Attempt missed. Nikica Jelavic (West Ham United) right footed shot from outside the box is just a bit too high. Assisted by Victor Moses.
Attempt missed. Moussa Sissoko (Newcastle United) right footed shot from the right side of the box is high and wide to the right. Assisted by Aleksandar Mitrovic.
Attempt blocked. Aleksandar Mitrovic (Newcastle United) right footed shot from the centre of the box is blocked. Assisted by Moussa Sissoko.
Attempt saved. Cheikhou Kouyaté (West Ham United) header from the right side of the six yard box is saved in the bottom right corner. Assisted by Nikica Jelavic with a cross.
Attempt missed. Jonjo Shelvey (Newcastle United) right footed shot from outside the box misses to the right. Assisted by Yoan Gouffran.
Foul by Nikica Jelavic (West Ham United).
Jack Colback (Newcastle United) wins a free kick in the defensive half.