Alexandre Lacazette came off the bench to keep Arsenal in the hunt for a Champions League place as his late strike survived a VAR review to seal a vital 1-0 win against West Ham on Saturday.
Mikel Arteta's side struggled to find any momentum for long periods at the Emirates Stadium and could easily have been behind before Lacazette settled a scrappy London derby.
The French striker turned in Mesut Ozil's header with 12 minutes left, but it took several minutes before VAR finally confirmed the German was onside when he laid on the goal.
Arsenal's third successive Premier League win lifted them within five points of fourth placed Chelsea, who face Everton on Sunday.
Earning a Champions League berth still looks a long-shot for Arsenal, especially after this uneven display.
But the Gunners, who face Manchester City on Wednesday, are unbeaten in their last eight league games and showed commendable spirit to make the late breakthrough.
West Ham have lost five of their last seven league games and, with only one win in their past nine, they are destined for a nervous finish to the season as they battle to avoid relegation.
Arteta admitted this week that only a victory against West Ham would keep their Champions League bid alive.
He got his wish, but only just.
There was no pre-match handshake between the teams following the Premier League edict to ditch the ritual over coronavirus fears.
Listless for long periods, Arsenal didn't look too keen on any contact once the game started either.
Granit Xhaka carelessly surrendered possession to Jarrod Bowen, whose long-range drive slipped through Bernd Leno's grasp onto the near post.
West Ham should have gone ahead when Michail Antonio raced onto Pablo Fornals' pass, but with the unmarked Sebastien Haller screaming for the ball, the winger could only send a woeful delivery yards behind him.
Pablo Mari, on loan from Flamengo, was making his Premier League debut at the heart of Arsenal's defence alongside David Luiz, while Greek centre-back Sokratis was used out of position at right-back.
But Arteta's reshuffled rearguard were easily exposed by Mark Noble's pin-point pass and Leno did well to get down quickly at the feet of Haller after the West Ham striker moved menacingly towards goal.
West Ham's enterprising opening was nearly undone when Sokratis thumped his close-range header onto the bar from Pierre-Emerick Aubameyang's cross.
There were still plenty of holes for David Moyes' men to exploit and only a shocking miss from Antonio stopped them scoring just before half-time.
Issa Diop climbed above Aubameyang and headed Noble's corner to Antonio, who somehow managed to screw wide from just two yards.
For the first time in over a year, Arsenal had failed to record a shot on target in the first half of a home league game.
They finally tested Lukasz Fabianski when Eddie Nketiah darted onto Bukayo Saka's pass and flicked his shot at the Hammers keeper.
West Ham remained a threat and it took a superb save from Leno to deny Antonio's close-range header from Haller's flick.
Arteta sent on Lacazette in place of Nketiah for the final 30 minutes and his arrival turned the game.
He saw his appeal for a penalty rejected by VAR after Angelo Ogbonna appeared to haul him down.
But Lacazette broke the deadlock with his ninth goal of the season in the 78th minute.
Aubameyang's shot deflected off Declan Rice and looped to Ozil, whose header found Lacazette for a clinical close-range finish.
A lengthy VAR review prolonged the agony for West Ham before it was finally ruled that Ozil was onside when he set up Lacazette.
Haller almost snatched an immediate equaliser but his effort was pushed away by Leno as Arsenal held on.