Arsenal’s hopes of a top-four finish were dented after Christian Benteke’s first goal in a year helped Crystal Palace to an excellent win which confirmed their Premier League place.
Benteke was left unmarked to head Luka Milivojevic’s delivery past Bernd Leno, only for Mesut Ozil to equalise with a clever finish shortly after half-time.
However, two goals in eight minutes ended Arsenal’s 10-match winning league run at Emirates Stadium.
Wilfried Zaha capitalised on a mistake by Shkodran Mustafi to restore Palace’s lead and James McArthur’s header made it 3-1 before Pierre-Emerick Aubameyang reduced the deficit with his 19th league goal of the season.
With Manchester United on the receiving end of a hammering at Everton earlier in the day, and Tottenham losing at Manchester City the previous day, this was an ideal opportunity for the Gunners to take a big step towards securing a Champions League place.
Yet Unai Emery’s side were punished for an awful defensive performance as they fell to only a second home league defeat under the Spaniard.
The marking for Benteke’s goal was non-existent, Mustafi’s failed attempt to block Zaha ended in embarrassment and a second Palace goal, while McArthur was also left unmarked to head home the third.
Captain Laurent Koscielny and leading scorer Aubameyang were starting their third game in eight days but this was an under-par performance by a team looking to finish in the top four for the first time in three seasons.
The Gunners monopolised possession but it required a double change at half-time to help them get back on level terms after Benteke’s header separated the teams at the interval.
Alex Iwobi, one of the substitutes, was involved in Ozil’s lovely equaliser, his pass finding Alexandre Lacazette to set up the German.
That should have been the signal to push on, yet Arsenal fell away and, despite a late rally which saw Aubameyang score, will fall out of the top four if Chelsea beat Burnley at Stamford Bridge on Monday.
Despite gathering only eight points from their first 12 games, Palace will spend a seventh successive season in the top flight after securing safety with three matches to spare.
While their home form has been disappointing, Palace have played with freedom and confidence on the road.
Having won at title-chasing Manchester City, they can now add a first win at Arsenal for 25 years to their impressive collection of away achievements.
Manager Roy Hodgson will hope Benteke can kick-on after ending a long wait for a goal.
The Belgian, who once scored 19 goals in a Premier League season for Aston Villa, missed a glorious chance to double Palace’s lead on the stroke of half-time.
It did not prove costly, Palace showing character to respond with two quick goals after Ozil’s equaliser.
Scott Dann and Martin Kelly were strong at the heart of the defence, while skipper Milivojevic was involved in two of his side’s three goals.
Arsenal play their fourth game in 10 days on Wednesday when they travel to face Wolves (19:45 BST), while Crystal Palace host Everton next Saturday.