Everton earned their Premier League status with a stunning comeback victory over Crystal Palace, coming from two goals behind.
The hosts, who will remain in the top division for the 68th time, appeared to be heading for defeat as Palace scored twice in the first half through Jean-Philippe Mateta and Jordan Ayew.
Everton turned the game around in the second half thanks to a more attacking style, conjuring up a fighter's spirit once more and pushed on by their boisterous crowd.
Michael Keane scored nine minutes after the break to give Frank Lampard's team hope, and when Richarlison struck the bottom corner with a miscued drive with 15 minutes left, Goodison Park erupted as a vital point was on the line.
But the best was yet to come, with only five minutes remaining. Dominic Calvert-Lewin triggered pandemonium with a diving header from Demarai Gray's free kick, his first goal since August against Brentford last Sunday amid an injury-plagued season.
Fans descended on the pitch to celebrate, creating a blue mist that shrouded the stadium as smoke flares were fired.
The vital outcome averted the final-day jitters that Everton fans had to endure in 1998 and 1994, when the team also retained its Premier League status.
This time, with a trip to Arsenal on Sunday, they can at least rejoice in the fact that, however difficult this season has been, they will remain in the top flight, and will try to build on the spirit demonstrated in the final stages of the season.
Thousands of fans flooded onto the ground after the final whistle, shooting out more smoke flares and saluting their team and boss Lampard.
However, given excessive investment on players and a relocation to a new stadium in 2024, he and the club will hope they never have to deal with a similar scare again.