Alexandre Lacazette came off the bench to earn Arsenal a win over a West Ham side who spurned several chances to leave the Emirates Stadium with three vital points.
The Hammers had won only one of the last eight Premier League meetings between the two sides and created the better opportunities of a game settled by Lacazette - who hit the only goal of the 1-0 win as VAR intervened after the effort had originally been ruled out for offside.
Home is certainly where the heart is for Lacazette, reduced to the role of substitute in recent weeks, as all seven of his league goals this season have come in front of his own fans.
Michail Antonio fluffed his lines on a couple of occasions while Jarrod Bowen hit the frame of the goal as the side David Moyes retained following the win over Southampton looked to spring a surprise.
Ultimately it would be Arsenal, who took a while to warm up in north London, who would claim the win to move Mikel Arteta's side within three points of fifth-place.
Bernd Leno enjoyed another fine afternoon in the Arsenal goal and was forced into early action, turning Bowen's low shot onto the post after the West Ham forward was presented with possession by Granit Xhaka.
The away side should have been ahead soon after, Antonio beating Pablo Mari to the ball and bursting into the Arsenal box, only to play his pass behind the onrushing Sebastien Haller - who would have had a simple finish.
The let-off seemed to stir Arsenal as Mesut Ozil saw a goal-bound shot blocked by Aaron Cresswell just moments later.
West Ham were still enjoying plenty of the ball in and around the Arsenal box and Leno had to be alert to spring from his line and deny Haller after he was slipped in by Mark Noble.
With chances now coming at both ends, Sokratis Papastathopoulos headed a Pierre-Emerick Aubameyang centre against the crossbar with Cresswell then bending a free-kick just over the top of Leno's goal.
After a lull in proceedings, Nicolas Pepe twice danced through the West Ham defence, firstly stopped by Declan Rice and then Eddie Nketiah being flagged offside after the second attempt saw the ball land at his feet.
Antonio spurned the best chance of the first-half as he could only turn the ball wide from close-range after latching onto Angelo Ogbonna's header.
The hosts came out of the traps much quicker after the break, Lukaz Fabianski doing well to keep out Nketiah's effort - but Arteta's side were still loose at the back.
Antonio was again the culprit when West Ham passed up their next chance to take the lead as Leno was able to paw away a free header following Haller's flick on.
Arteta turned to Lacazette and Reiss Nelson from the bench in an attempt to find the goal and it was the former who provided the goods.
Aubameyang's shot was deflected over the West Ham defence and Ozil knocked down for Lacazette to sweep home, although his strike was initially ruled out by Sian Massey-Ellis' offside flag.
She appeared to flag against Nelson, who was not involved in the move, and after a lengthy VAR check it was deemed Ozil was played on by Ogbonna, with the goal standing.
The goal was enough to settle the game, with Arsenal keeping their hopes of European qualification alive and West Ham outside of the bottom three by virtue of goal difference alone.