Newcastle United stopped their miserable run of four successive defeats by recording their fourth straight win in London as they beat West Ham 3-1 at Upton Park.

Yohan Cabaye opened the scoring before Loic Remy’s 11th goal of the season doubled the Magpies’ advantage. The Hammers pulled a goal back on the stroke of half time when Mike Williamson got the final touch on a scruffy Carlton Cole shot but Cabaye settled the nerves with an injury time free kick for the Geordies.

In fairness, the visitors should have killed the game off earlier than Cabaye’s late free kick but an unnecessarily nervy second half could have cost them.

Newcastle have made a habit of trying to sit on half-time leads and had it not been for Andy Carroll misfiring when well placed, could have blown their good work from the first period.

Alan Pardew kept faith with the 4-3-3 formation that has been employed recently and Cabaye was instantly the man who stood out in the number 10 role. His side had been lacklustre in the first ten minutes but when Yoan Gouffran found the former Lille midfielder after 16 minutes, he was able to tiptoe into the box and fire past Adrian in the West Ham goal.

Newcastle instantly went for the jugular. They moved through the gears nicely and Gouffran almost had a goal for himself just three minutes later, only for the shot to be cleared off the line.

West Ham looked like a side that had been stripped of all confidence. They were a shambles defensively and a perfect Cabaye pass sent Moussa Sissoko through, only for the Frenchman to fluff his finish when one on one with Adrian.

But after 33 minutes the lead was finally doubled. Sissoko was involved as his cross from the right found Remy and the striker’s clever movement allowed him to chest the ball down before stabbing home.

From the moment it went 2-0 the floodgates should have opened but instead the home side scored a lucky goal that gave them hope.

Inevitably it came from a long ball and the knockdown fell to Cole, whose shot squirmed in thanks to a combination of the striker, Tim Krul and crucially, Williamson.

Sam Allardyce threw on Ravel Morrison and former Newcastle striker Carroll as his side chased the game and they certainly had chances to snatch something.

First, Cole managed to make a mess of Matt Taylor’s brilliant cross and let Newcastle off the hook, before Carroll gave the travelling fans something to smile about when he put a volley over the bar from little more than six yards.

Pardew made a substitute of his own when he brought Hatem Ben Arfa on to threaten on the counter attack but it took until stoppage time for the third goal to come. Man of the match Cabaye deservedly got it, curling home a fantastic free kick that went in off the post to end Newcastle’s post-Christmas poor form.