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 they 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 which the team has 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.
More to follow.
helpHow to play
Rate players out of 10 throughout or after the game. The rater will close 30 minutes after the final whistle.
Rating range key1 = Give it up10 = Pure perfection
Everton
Squad number1Player namePickford
Squad number23Player nameColeman
Squad number5Player nameKeane
Squad number4Player nameHolgate
Squad number17Player nameIwobi
Squad number16Player nameDoucouré
Squad number21Player nameAndré Gomes
Squad number19Player nameMykolenko
Squad number24Player nameGordon
Squad number7Player nameRicharlison
Squad number9Player nameCalvert-Lewin
Squad number2Player nameKenny
Squad number11Player nameGray
Squad number36Player nameAlli
Crystal Palace
Squad number1Player nameButland
Squad number17Player nameClyne
Squad number16Player nameAndersen
Squad number6Player nameGuéhi
Squad number3Player nameMitchell
Squad number10Player nameEze
Squad number12Player nameHughes
Squad number15Player nameSchlupp
Squad number9Player nameJ Ayew
Squad number14Player nameMateta
Squad number11Player nameZaha
Squad number4Player nameMilivojevic
Squad number20Player nameBenteke
Squad number23Player nameGallagher
Line-ups
Everton
Formation 3-4-2-1
1Pickford
23Coleman5Keane4Holgate
17Iwobi16Doucouré21André Gomes19Mykolenko
24Gordon7Richarlison
9Calvert-Lewin
1Pickford23Coleman5KeaneBooked at 67mins4Holgate17Iwobi16DoucouréBooked at 82mins21André GomesSubstituted forAlliat 45'minutes19Mykolenko24GordonSubstituted forGrayat 61'minutes7RicharlisonSubstituted forKennyat 90+1'minutes9Calvert-LewinSubstitutes
2Kenny6Allan11Gray15Begovic22Godfrey26Davies30van de Beek36Alli64WelchCrystal Palace
Formation 4-3-3
1Butland
17Clyne16Andersen6Guéhi3Mitchell
10Eze12Hughes15Schlupp
9J Ayew14Mateta11Zaha
1Butland17Clyne16Andersen6Guéhi3Mitchell10Eze12HughesBooked at 32minsSubstituted forMilivojevicat 57'minutes15SchluppSubstituted forGallagherat 74'minutes9J AyewBooked at 34mins14MatetaSubstituted forBentekeat 81'minutes11ZahaBooked at 69minsSubstitutes
2Ward4Milivojevic8Kouyaté13Guaita20Benteke22Édouard23Gallagher34Kelly49Rak-SakyiLive Text
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.
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