Match ends, Arsenal 4, West Ham United 1.
Arsene Wenger's Arsenal farewell started in the perfect manner as the Gunners scored three goals in seven second-half minutes to ease to victory against West Ham at the Emirates.
This was the first match since Wenger announced he would be leaving the club at the end of the season on Friday, after almost 22 years.
Victory was also the perfect warm-up to Thursday's Europa League semi-final first leg against Atletico Madrid.
The Gunners had taken the lead on 51 minutes after Nacho Monreal volleyed in from a corner, but Marko Arnautovic equalised just after the hour mark, rifling a shot past David Ospina.
Aaron Ramsey put the hosts back into the lead in the 82nd minute when his tame cross was not dealt with by Hammers' defender Declan Rice and Joe Hart could only watch as the ball rolled in at his far post.
Alexandre Lacazette made it three as his close-range shot beat Hart at the near post in the 85th minute, before the Frenchman sidefooted in his second four minutes later.
One negative for Wenger will be an injury to Mohamed Elneny, who was taken off the pitch on a stretcher after injuring his foot in a 50-50 challenge with Mark Noble towards the end of the first half.
Victory keeps Arsenal sixth, 11 points behind fourth-placed Tottenham with four games remaining, but while they can still mathematically finish in the top four, their most likely route into the Champions League is by winning the Europa League.
West Ham, who had dominated much of the first half, drop to 15th place, six points from the drop zone.
- Live reaction
- 'The brilliant revolutionary who refused to change himself'
- What next for Arsenal after Wenger exit?
Arsenal turn on the style
Wenger made five changes to the side that lost 2-1 to Newcastle last week. Some were enforced, while others were made with the Europa League in mind.
Record signing Pierre-Emerick Aubameyang started on the bench and Petr Cech missed out with a hip injury.
Mesut Ozil missed the game with illness, while Jack Wilshere and Sead Kolasinac had ankle injuries.
Despite Wenger's impending departure, the Emirates lacked a celebratory mood as the teams came out. There were empty seats, no fanfare and the Frenchman snuck into his dugout.
The first half gave Arsenal fans little to cheer about as the visitors dominated the early exchanges.
Granit Xhaka had their only shot on target as his free-kick stung the palms of Hart, while Danny Welbeck wasted a number of chances.
Shkodran Mustafi struggled in defence against Arnautovic and there were warning signs ahead of a meeting with one of the world's best strikers in Atletico's Antoine Griezmann.
Despite deservedly taking the lead after half-time, their defensive frailties were exposed again for the equaliser.
The introduction of Aubameyang in the 70th minute lifted the team and the fans.
Hart was twice forced into action, first by Xhaka and then by Welbeck, before Ramsey's goal started a late flourish as Arsenal finished in style.
The Hammers, unchanged from their 1-1 draw with Stoke on Monday, caused Arsenal plenty of problems in the first half and they looked in the mood to ruin Wenger's long farewell.
Ospina saved from Arnautovic while Cheikhou Kouyate hit the bar with a header but, after the 21st minute, they did not have another chance until the hour mark.
They were second best after the break, though they were briefly lifted by the introductions of Javier Hernandez and Manuel Lanzini, who helped force the equaliser.
England keeper Hart, who is fighting for a place at the World Cup, had played well in the game with some crucial stops, until he was undone by Rice's indecision, while he could have done better with Lacazette's first.
Despite the heavy defeat, West Ham will be buoyed by Stoke's draw with Burnley which gives them breathing space in their battle to avoid relegation.
Man of the match - Aaron Ramsey
'A good way to prepare' - what they said
Arsenal manager Arsene Wenger: "I was focused on winning the game. We just tried to be professional and do our job even when the circumstances are different. It was a good team spirit and good preparation for Thursday.
"I think we constructed patiently. We didn't make big mistakes. First of all before winning a trophy, you need to get through the semi-finals. This is a good way to prepare - scoring goals against a strong West Ham team who have done well recently."
West Ham manager David Moyes: "It [Wenger's announcement] did make it more difficult but I didn't think it played that way. We did a really good job and contained them for long periods.
"We just didn't start the second half as well and they got a foothold in the game. We came back into it but in the end we probably had too many attacking players on the pitch and ruined our balance of making sure we did the defensive job well.
"Great credit to the lads for how well they stuck at it. Unfortunately a young player [Declan Rice] makes a mistake - but that's how you learn, make mistakes and get on with it and hopefully come back better."
Moyes' Wenger curse - stats
- Arsenal have won six consecutive home matches in all competitions, netting at least three goals in each victory (20 goals in total).
- Wenger has beaten Moyes in 22 matches in all competitions - more than any another manager during his time as Arsenal boss.
- Moyes is winless in all 18 of his away matches against Arsenal in all competitions (D4 L14).
- The last three occasions that West Ham have conceded four second-half goals in a Premier League game have been against Arsenal (January 2013, December 2016 and today).
- Monreal has scored three goals in his last seven Premier League appearances - as many as he had in his first 153 appearances in the competition.
- Ramsey has been involved in more goals in all competitions than any other Arsenal player this season (19, 11 goals, eight assists).
- Arnautovic has had a hand in 14 goals in his last 16 Premier League appearances (10 goals, four assists).
- 80% of Lacazette's goals for Arsenal this season have come at the Emirates (12 of 15).
Arsenal's focus switches to Thursday's Europa League semi-final as they host Atletico Madrid (20:05 BST) in the first leg at the Emirates. That is followed by a trip to Old Trafford to face Manchester United on Sunday (16:30 BST).
West Ham's next game is against the Premier League champions Manchester City on Sunday (14:15 BST) at London Stadium.
- 20MustafiBooked at 74mins
- 35ElnenySubstituted forMaitland-Nilesat 45'minutesBooked at 62mins
- 29XhakaBooked at 41mins
- 17IwobiSubstituted forAubameyangat 70'minutes
- 23WelbeckSubstituted forChambersat 88'minutes
- 5ZabaletaBooked at 50mins
- 26MasuakuSubstituted forCarrollat 86'minutes
- 31FernandesSubstituted forLanziniat 60'minutes
- 18João MárioSubstituted forHernándezat 60'minutes
- 7ArnautovicBooked at 87mins
- Lee Mason
- Shots on Target
Second Half ends, Arsenal 4, West Ham United 1.
Foul by Shkodran Mustafi (Arsenal).
Chicharito (West Ham United) wins a free kick on the right wing.
Attempt missed. Granit Xhaka (Arsenal) left footed shot from the centre of the box is high and wide to the left. Assisted by Alexandre Lacazette.
Goal! Arsenal 4, West Ham United 1. Alexandre Lacazette (Arsenal) right footed shot from the centre of the box to the bottom right corner. Assisted by Aaron Ramsey.
Substitution, Arsenal. Calum Chambers replaces Danny Welbeck.
Marko Arnautovic (West Ham United) is shown the yellow card for a bad foul.
Pierre-Emerick Aubameyang (Arsenal) wins a free kick on the left wing.
Foul by Marko Arnautovic (West Ham United).
Substitution, West Ham United. Andy Carroll replaces Arthur Masuaku.
Goal! Arsenal 3, West Ham United 1. Alexandre Lacazette (Arsenal) right footed shot from the right side of the box to the bottom right corner. Assisted by Pierre-Emerick Aubameyang.
Attempt blocked. Pierre-Emerick Aubameyang (Arsenal) right footed shot from the left side of the box is blocked. Assisted by Aaron Ramsey.
Goal! Arsenal 2, West Ham United 1. Aaron Ramsey (Arsenal) right footed shot from a difficult angle and long range on the left to the bottom right corner.
Foul by Nacho Monreal (Arsenal).
Cheikhou Kouyaté (West Ham United) wins a free kick in the defensive half.
Laurent Koscielny (Arsenal) wins a free kick in the attacking half.
Foul by Marko Arnautovic (West Ham United).
Corner, Arsenal. Conceded by Joe Hart.
Attempt saved. Danny Welbeck (Arsenal) right footed shot from outside the box is saved in the bottom right corner.