Arsenal reclaimed fourth spot in the Premier League with an important victory at West Ham and dented the Hammers' own chances of securing European football next season.
The Gunners knew only a win would lift them back into the Champions League places after Tottenham beat Leicester earlier in the afternoon, but Mikel Arteta's side responded by grinding out a vital three points at London Stadium.
It was Arteta's centre-backs who came up with the goods, with Gabriel Magalhaes nodding the winner early in the second half after Rob Holding had opened the scoring from Bukayo Saka's 38th-minute corner.
Jarrod Bowen did pull the Hammers level just before the break, controlling Vladimir Coufal's cross and squeezing a strike into the bottom corner in what was a reward for a strong first-half performance.
But David Moyes' outfit failed to reach those levels after going behind for a second time - and defeat leaves them seventh, three points behind sixth-placed Manchester United with three games remaining.
Gunners grind out vital win
The Gunners are desperate to return to Europe's elite competition next season and Arteta's side have enjoyed the advantage of having no continental football this term, meaning all their resources can be focused on achieving a top-four finish for the first time since 2015-16.
West Ham's only realistic chance of qualifying for the Champions League now is to win the Europa League - and Moyes' team would be forgiven for having one eye on overturning their 2-1 deficit in the semi-final second leg against Eintracht Frankfurt in Germany on Thursday.
Arsenal struggled to get a foothold, though, before Eddie Nketiah's clever run and low shot forced a corner, from which Holding climbed highest to head in Saka's delivery for his first Premier League goal.
Bowen's smart finish pulled the Hammers level on the brink of half-time. But, after the hosts failed to properly clear a corner, Gabriel was left unmarked at the back post to head in Gabriel Martinelli's 54th-minute cross, beating former Arsenal stopper Lukasz Fabianski at his near post.
Nketiah could have sealed the success on the break, only to curl wide, but the 22-year-old continued to prove a threat after again being trusted to lead the line for Arsenal.
The visitors were not at their fluent best, but as the battle with north London rivals Spurs hots up - and with the Gunners heading to Tottenham a week on Thursday - restoring their two-point advantage was the most important outcome for Arsenal.
Hammers' season in danger of fizzling out
Jarrod Bowen scored his 10th Premier League goal of the seasonInjuries and suspensions have hit the Hammers and they found themselves without three senior centre-backs in Craig Dawson, Issa Diop and Angelo Ogbonna on Sunday, with left-back Aaron Cresswell chosen to partner Kurt Zouma.
That may have been partly to blame for the hosts coming unstuck twice from set-pieces, but this was also West Ham's 52nd match of the season - 11 more than Arsenal have played - and they struggled to unpick the Gunners as the game wore on.
The hosts found themselves behind despite having the better of the opening half an hour. They responded to Holding's opener within seven minutes when Bowen grabbed his 10th top-flight goal of the campaign, becoming the first Englishman to reach double figures for the club since Kevin Nolan in 2012-13.
Moyes turned to Michail Antonio, rested before Thursday's Europa League semi-final second leg, with 19 minutes remaining to try to find a leveller for the second time, but the forward only managed one touch in the opposition box.
The Hammers have now dropped points in each of their past four Premier League matches following a Europa League fixture, while this loss brought their six-game unbeaten home run in the league to an end.
More worryingly for Moyes, his side are winless in their past four Premier League outings - and the Scot will not want what has been a productive season to fizzle out now.
Player of the match
HoldingRob Holding
West Ham United
Squad number20Player nameBowen
Squad number41Player nameRice
Squad number22Player nameBenrahma
Squad number1Player nameFabianski
Squad number8Player nameFornals
Squad number16Player nameNoble
Squad number3Player nameCresswell
Squad number5Player nameCoufal
Squad number10Player nameLanzini
Squad number24Player nameFredericks
Squad number9Player nameAntonio
Squad number7Player nameYarmolenko
Squad number28Player nameSoucek
Squad number4Player nameZouma
Line-ups
West Ham
Formation 4-2-3-1
1Fabianski
5Coufal4Zouma3Cresswell24Fredericks
16Noble41Rice
8Fornals10Lanzini22Benrahma
20Bowen
1Fabianski5Coufal4Zouma3CresswellBooked at 90mins24Fredericks16NobleSubstituted forSoucekat 77'minutes41Rice8Fornals10LanziniSubstituted forAntonioat 71'minutes22BenrahmaSubstituted forYarmolenkoat 81'minutes20BowenBooked at 52minsSubstitutes
7Yarmolenko9Antonio11Vlasic13Areola23Diop26Masuaku28Soucek33Král42AleseArsenal
Formation 4-3-3
32Ramsdale
18Tomiyasu16Holding6Gabriel20Tavares
8Ødegaard25Elneny34Xhaka
7Saka30Nketiah35Martinelli
32Ramsdale18TomiyasuSubstituted forCédric Soaresat 78'minutes16Holding6Gabriel20Tavares8ØdegaardSubstituted forSambi Lokongaat 90+2'minutes25Elneny34Xhaka7SakaBooked at 48minsSubstituted forSmith Roweat 87'minutes30NketiahBooked at 90mins35MartinelliSubstitutes
1Leno9Lacazette10Smith Rowe17Cédric Soares19Pépé23Sambi Lokonga54Kirk65Oulad M'hand69SwansonLive Text
Match ends, West Ham United 1, Arsenal 2.
Second Half ends, West Ham United 1, Arsenal 2.
Foul by Michail Antonio (West Ham United).
Eddie Nketiah (Arsenal) wins a free kick in the defensive half.
Attempt missed. Albert Sambi Lokonga (Arsenal) right footed shot from the right side of the box is high and wide to the right. Assisted by Eddie Nketiah.
Substitution, Arsenal. Albert Sambi Lokonga replaces Martin Ødegaard.
Aaron Cresswell (West Ham United) is shown the yellow card.
Eddie Nketiah (Arsenal) is shown the yellow card.
Pablo Fornals (West Ham United) wins a free kick in the defensive half.
Foul by Mohamed Elneny (Arsenal).
Jarrod Bowen (West Ham United) wins a free kick in the defensive half.
Foul by Cédric Soares (Arsenal).
Substitution, Arsenal. Emile Smith Rowe replaces Bukayo Saka because of an injury.
Hand ball by Bukayo Saka (Arsenal).
Offside, West Ham United. Vladimir Coufal tries a through ball, but Andriy Yarmolenko is caught offside.
Substitution, West Ham United. Andriy Yarmolenko replaces Saïd Benrahma.
Corner, Arsenal. Conceded by Lukasz Fabianski.
Attempt saved. Eddie Nketiah (Arsenal) right footed shot from outside the box is saved in the bottom right corner.
Substitution, Arsenal. Cédric Soares replaces Takehiro Tomiyasu because of an injury.
Substitution, West Ham United. Tomas Soucek replaces Mark Noble.
Our coverage of your Premier League club is bigger and better than ever before - here's everything you need to know to make sure you never miss a moment