Andy Carroll's hat-trick was not enough for West Ham to seal a stunning comeback win as Arsenal secured a 3-3 draw in a thriller at Upton Park.
Back-to-back draws had derailed West Ham's top-four ambitions and frustrations began to mount for Slaven Bilic's side as they found themselves two goals behind an Arsenal side still harbouring hopes of the Premier League title.
Manuel Lanzini had a goal harshly ruled out for offside shortly before Mesut Ozil struck his sixth league goal of the season, and Alexis Sanchez doubled the lead 10 minutes before the break.
But Arsenal surrendered their control on the game as Carroll - who was perhaps fortunate to receive only a booking for an early lunge on Laurent Koscielny - scored twice inside 160 first-half seconds, and his emphatic header shortly after half-time put the hosts in front.
Nacho Monreal saw a shot cleared off the line but Koscielny had better luck as he steered high into the net to bring Arsene Wenger's side level, although a crucial seventh goal proved elusive as both teams' ambitions took a blow.
The Gunners were hugely fortunate not to go a goal down with 14 minutes played. Carroll met Mark Noble's cross with an overhead kick and Lanzini nodded the ball in from close range, only for the assistant to raise his flag for offside, despite Hector Bellerin playing the Argentine on.
Upton Park's final London derby was going against the hosts as Arsenal opened up a two-goal lead.
Alex Iwobi was central to both goals, first setting up Ozil - who beat the offside trap to fire into the bottom-left corner, through the legs of Adrian - before the Nigeria international lobbed a pass into the path of Sanchez, who had the freedom of the penalty area to slot home.
Arsenal looked in total control against an unusually sluggish West Ham, but the hosts snatched a lifeline just a minute before half-time when Carroll steered in Aaron Cresswell's superb curling cross from the left.
Adrian reacted well to keep out Monreal's effort from close range, and West Ham capitalised on that miss to level the scores in stoppage time.
Carroll was given space to bring down the ball just six yards out and, after his initial effort was blocked, he reacted quickest with a scissor-kick volley which deflected off Gabriel and flew past David Ospina.
Referee Craig Pawson waved away penalty shouts from West Ham as Bellerin slipped and brought down Cresswell in the area, before Dimitri Payet saw a goal disallowed after Carroll was adjudged to have fouled Koscielny.
But Carroll completed West Ham's comeback - and his hat-trick - just two minutes later. Michail Antonio burst clear down the right and clipped a cross to the back post, where the ex-Liverpool man rose highest to power a header past Ospina despite Gabriel's best efforts.
Monreal had a shot from 20 yards cleared off the line by Winston Reid but Arsenal restored parity with 20 minutes to play, Koscielny side-footing high past Adrian from 12 yards after Danny Welbeck touched the ball into his path.
Cresswell and Payet forced Ospina into good saves from distance and Olivier Giroud headed narrowly wide, but there was nothing to separate the teams come the end of a breathless 90 minutes.
Key Opta stats:
- Andy Carroll is the first Premier League player to score a hat-trick v Arsenal since Wayne Rooney in August 2011.
- Carroll's hat-trick was the fastest in the Premier League this season at seven minutes and 14 seconds (between first and third goals).
- Mesut Ozil has scored six times for Arsenal this season, his best return in a Premier League season for the club.
- Alex Iwobi has scored twice and assisted another two goals in his first three PL starts for Arsenal.
- The Hammers are unbeaten in their last 14 home games (W7 D7), the longest such current run in the top-flight.