Jean-Philippe Mateta scored his seventh goal of the season
Everton secured their Premier League status with an incredible fightback where they came from two goals down to beat Crystal Palace.
The hosts, who will continue their 68-year stay in the top flight, looked like they were heading for defeat after Palace scored twice in the first half through Jean-Philippe Mateta and Jordan Ayew.
But conjuring up a fighter's spirit once more and spurred on by their vociferous support, Everton turned the game around in the second half, thanks to a more attacking approach.
Nine minutes after the break Michael Keane smashed in to give Frank Lampard's side hope, and when Richarlison found the bottom corner with a miscued shot with 15 minutes left, it sent Goodison Park into raptures as a precious point looked likely.
Yet the best was to come with five minutes left. Dominic Calvert-Lewin, who scored his first goal since August against Brentford last Sunday during an injury-hit season, sparked pandemonium with a diving header from Demarai Gray's free-kick.
The excitement boiled over as fans descended on the pitch to celebrate, with blue mist shrouding the stadium as smoke flares were let off.
The crucial result avoided the kind of final-day nerves that Everton fans had to experience in 1998 and 1994, where the team also preserved their Premier League status.
This time, with a trip to Arsenal on Sunday, they can at least enjoy the fact that however tortuous this season has been, they will remain in the top flight, and will hope to build on the spirit showed in the closing stages of the campaign.
The party started at the final whistle, with thousands of fans flooding onto the pitch, letting off more smoke flares, saluting their team and manager Lampard.
But he and the club will hope they will never have to cope with a similar scare again given lavish spending on players and a move to a new stadium in 2024.
Spirit from fans and players save Everton again
Lampard described this game as "all or nothing" given Everton's wretched away record, which has seen them win once on the road since August.
And despite a poor showing in the first period, where once again Everton looked inferior to their opponents, they somehow managed another second-half turnaround, which has been crucial in keeping them in the Premier League.
The scenes at the final whistle were in stark contrast to those before the break where a tempestuous game boiled over on the pitch and left a livid feeling in the stands.
But after the introduction of Dele Alli at the break and a move to a more attacking formation, Everton matched their second-half showings against Newcastle, Leicester and Chelsea, which earned two draws and a win.
Lampard may well question why his side have to play poorly to find the inspiration, but boosted by a support which has had a massive role in their survival, they turned the game around against a Palace side which had beaten them twice already this season.
Palace dominate first half
Sunday's defeat by Brentford threatened to derail Everton's momentum gathered by their superior home form, but the hand that supporters have played in keeping the Toffees up cannot be underestimated.
Lampard and fans tried to evoke the spirit of recent matches from the start, with the team coach greeted by a wall of blue smoke outside the stadium.
That almost boiled over early on as Anthony Gordon and Wifried Zaha squared up to each other, causing a melee, but once Palace settled they quickly picked off an Everton side who struggled to keep the ball.
Lampard again favoured a 3-5-2 formation, but when his side retreated into a back five, Patrick Vieira's visitors were able to enjoy plenty of possession and control the game.
There were moments in first half for Everton's fans to get excited about, like Richarlison's free-kick that hit the bar.
But for the most part the passionate home support turned to anger as Mateta scored his seventh goal of the season before helping to create Palace's second.
The fact it came from Ayew was contentious. He had hacked down Gordon shortly before but only received a yellow card and was then on hand to take advantage as both Vitaliy Mykolenko and Abdoulaye Doucoure somehow failed to connect with the ball on the line following Zaha's shot.
That silenced the crowd, who must have felt like relegation was staring them in the face.
But a half-time switch to a back four by Lampard, who replaced the ineffective Andre Gomes with Alli, breathed life into Everton.
Nine minutes after the break, Keane fired in after Mykolenko's free-kick was headed back to the centre-back by Mason Holgate.
And with 15 minutes left, Everton managed to conjure up another goal. Alli had a hand in it, crossing the ball, but when the Palace defence failed to clear Richarlison's shot ended up in the bottom corner, setting off wild celebrations.
That seemed minor compared to Calvert-Lewin's winner. Everton fans could not contain their delight, running onto the pitch, with Zaha seeming to take issue with some supporters' attentions.
The pitch was eventually cleared, but there was little hope for the stewards as thousands celebrated with their heroes at the final whistle.
Player of the match
with an average of 7.13
- EvertonEvertonEvertonCrystal PalaceCrystal PalaceCrystal Palace
EvertonAvgSquad number36Player nameAlliAverage rating
Squad number2Player nameKennyAverage rating
Squad number11Player nameGrayAverage rating
Squad number9Player nameCalvert-LewinAverage rating
Squad number7Player nameRicharlisonAverage rating
Squad number19Player nameMykolenkoAverage rating
Squad number23Player nameColemanAverage rating
Squad number5Player nameKeaneAverage rating
Squad number17Player nameIwobiAverage rating
Squad number24Player nameGordonAverage rating
Squad number1Player namePickfordAverage rating
Squad number4Player nameHolgateAverage rating
Squad number16Player nameDoucouréAverage rating
Squad number21Player nameAndré GomesAverage rating
Crystal PalaceAvgSquad number10Player nameEzeAverage rating
Squad number14Player nameMatetaAverage rating
Squad number1Player nameButlandAverage rating
Squad number17Player nameClyneAverage rating
Squad number12Player nameHughesAverage rating
Squad number9Player nameJ AyewAverage rating
Squad number15Player nameSchluppAverage rating
Squad number16Player nameAndersenAverage rating
Squad number6Player nameGuéhiAverage rating
Squad number3Player nameMitchellAverage rating
Squad number11Player nameZahaAverage rating
Squad number23Player nameGallagherAverage rating
Squad number4Player nameMilivojevicAverage rating
Squad number20Player nameBentekeAverage rating
- Line-upsMatch StatsLive Text
- 1Pickford23Coleman5KeaneBooked at 67mins4Holgate17Iwobi16DoucouréBooked at 82mins21André GomesSubstituted forAlliat 45'minutes19Mykolenko24GordonSubstituted forGrayat 61'minutes7RicharlisonSubstituted forKennyat 90+1'minutes9Calvert-Lewin
- 2Kenny6Allan11Gray15Begovic22Godfrey26Davies30van de Beek36Alli64Welch
- 1Butland17Clyne16Andersen6Guéhi3Mitchell10Eze12HughesBooked at 32minsSubstituted forMilivojevicat 57'minutes15SchluppSubstituted forGallagherat 74'minutes9J AyewBooked at 34mins14MatetaSubstituted forBentekeat 81'minutes11ZahaBooked at 69mins
Referee:Anthony TaylorMatch StatsHome TeamEvertonAway TeamCrystal PalacePossessionHome43%Away57%ShotsHome12Away7Shots on TargetHome6Away5CornersHome4Away5FoulsHome9Away13Live TextPost update
Match ends, Everton 3, Crystal Palace 2.
Second Half ends, Everton 3, Crystal Palace 2.
Hand ball by Christian Benteke (Crystal Palace).
Foul by Christian Benteke (Crystal Palace).
Jordan Pickford (Everton) wins a free kick in the defensive half.
Foul by Conor Gallagher (Crystal Palace).
Mason Holgate (Everton) wins a free kick in the defensive half.
Substitution, Everton. Jonjoe Kenny replaces Richarlison.
Goal! Everton 3, Crystal Palace 2. Dominic Calvert-Lewin (Everton) header from the centre of the box to the bottom right corner. Assisted by Demarai Gray with a cross.
Foul by Wilfried Zaha (Crystal Palace).
Séamus Coleman (Everton) wins a free kick on the right wing.
Offside, Crystal Palace. Eberechi Eze tries a through ball, but Wilfried Zaha is caught offside.
Offside, Crystal Palace. Joachim Andersen tries a through ball, but Christian Benteke is caught offside.
Abdoulaye Doucouré (Everton) is shown the yellow card for a bad foul.
Eberechi Eze (Crystal Palace) wins a free kick on the left wing.
Foul by Abdoulaye Doucouré (Everton).
Substitution, Crystal Palace. Christian Benteke replaces Jean-Philippe Mateta.
Conor Gallagher (Crystal Palace) wins a free kick on the right wing.
Foul by Abdoulaye Doucouré (Everton).
Jordan Ayew (Crystal Palace) wins a free kick in the defensive half.
Page 1 of 5rewindpreviousNavigate to the next pagenextNavigate to the last pageforward
- 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