Stoppage-time goals from Gabriel Martinelli and Nicolas Pepe spoiled Roy Hodgson’s final home match in charge of Crystal Palace and helped Arsenal secure a potentially vital 3-1 win in south London.
It was revealed on Tuesday that the 73-year-old would depart Selhurst Park at the end of the season and, when Christian Benteke headed home midway through the second half, the Eagles looked poised to end on a positive note with the score level.
Gunners attackers Martinelli and Pepe had other ideas and the late efforts by the duo kept the Gunners in the race for European football next term ahead of their final clash of the campaign.
Hodgson received warm applause an hour before the match got under way when he came out to do his pre-match media duties and a thunderous reception greeted him before kick-off.
Both sets of players formed a guard of honour in a mark of respect to Hodgson, who shook the hand of opposite number Mikel Arteta before he acknowledged the 6,500 spectators in attendance.
It was only the second time this season Palace had played in front of a crowd at Selhurst Park and they were almost treated to an early goal, but Gary Cahill headed wide from a James McCarthy cross.
The major negative for the home side was the absence of Ebere Eze, who had sustained a serious injury in training this week which is set to sideline him for a lengthy period of time.
While a large portion of the focus was on the Eagles, Arsenal were eager to keep alive their faint hopes of qualifying for a European competition next season with a fourth Premier League win in a row.
Arteta’s side dominated possession during the early exchanges but as so often has been the case this term struggled to create any clear-cut chances.
Left back Kieran Tierney had also taken on the role of pantomime villain after he went down during the opening minutes following a collision with Joel Ward.
Every touch from the Scotland international was booed but he was able to hit back at his critics with a hand in the opener after 35 minutes.
Following a smart one-two with Bukayo Saka, Tierney picked out the unmarked Pepe in the six-yard area and the Ivory Coast international volleyed home for his 13th goal of the season.
Palace had squandered two decent opportunities before the deadlock was broken with in-form striker Benteke only able to head over from an Andros Townsend free kick while Jeffrey Schlupp’s stinging drive forced Bernd Leno into a diving save three minutes before the breakthrough.
The Belgian clashed with Mohamed Elneny before half time and both were booked as Arsenal went into the break with hopes of a top-seven finish alive and kicking.
After an inconspicuous start to the second period, the supporters inside the ground started to raise the decibel levels and Palace responded with the equaliser in the 62nd minute.
Once again Townsend delivered an excellent free kick into the area and this time Benteke was able to hit the target with his diving header, scoring in the fourth game in a row.
VAR needed to check offside and a potential foul on Elneny, but after a slight delay it was awarded and the ex-Liverpool striker had his 10th goal of the campaign.
Eight minutes later and he nearly had another but Leno thwarted his close-range shot following Wilfried Zaha’s cross. Arteta had seen enough and Martin Odegaard and Martinelli were introduced with the Gunners realistically requiring a win to remain in the hunt for Europe.
Jordan Ayew and Pierre-Emerick Aubameyang failed to make the most of good openings in the 83rd minute before Arsenal ruined Hodgson’s Selhurst Park farewell.
Odegaard found Martinelli in the area, who finished smartly past Vicente Guaita from close range in the first minute of stoppage time, and with the last kick of the game Pepe slotted home to seal the points for the visitors.
While Arsenal’s quest for Europe continued, Hodgson bowed out from Selhurst Park for one last time to a rapturous ovation following a presentation at the end of the match.