Dominic Calvert-Lewin's diving header five minutes from time has extended Everton's proud 71-year stay in the top flight with a 3-2 victory over Crystal Palace on a night for the ages at Goodison Park.
Needing a victory to make themselves safe and avoid an awkward last-day trip to top-four-chasing Arsenal, the situation looked bleak when they went 2-0 down inside 36 minutes.
But manager Frank Lampard's tactical changes, plus the sheer emotion and force of a raucous crowd, dramatically turned things around in the second half as first Michael Keane and then Richarlison, with his sixth in nine games, teed up a rousing finale.
And with the stage set, Calvert-Lewin - fresh from scoring his first goal since August in Saturday's defeat to Brentford - launched himself at a free-kick and watched as the Gwladys Street End behind the goal exploded, followed by the rest of the ground.
The pressure had been so unbearable for so long, hundreds of fans and smoke grenades spilled onto the pitch in celebration and, while it was short-lived and good-natured, referee Anthony Taylor and his assistants retreated behind a wall of police on the touchline.
There was another incursion by thousands at the final whistle and inevitably there will be consequences for Everton, but nothing as damaging as what was staring them in the face with 150 minutes remaining of their season.
The calamitous nature of their defending which allowed Jean-Philippe Mateta and Jordan Ayew to put the visitors into a deserved two-goal lead was forgotten on a night of celebration and relief at the final whistle as Lampard's name was chanted by all four sides of this old ground.
Lampard hailed a "special night" in Everton's history.
"At half-time, we are not dead and buried but anyone on the outside would say that and it is the character of this club, the fans and the players that dragged us through," he told Sky Sports.
"The spirit of the club was immense ... namely the players, the board, the staff and my staff. It is a huge night for Everton and now we want to take that forward."
At Villa Park, Nick Pope's heroics at Aston Villa handed Burnley a vital survival lifeline and kept their Premier League future in their own hands.
The goalkeeper's masterclass ensured the Clarets left Birmingham with a point from a 1-1 draw after stops from John McGinn, Ollie Watkins, Danny Ings and Bertrand Traore.
Ashley Barnes' penalty - his first goal for 15 months - had given the Clarets the lead before Emi Buendia levelled soon after the break.
"The main thing is Popey has kept us in the game," Barnes told Sky Sports.
"He was outstanding and that is why he is there. That is why we rely on him every week and it is all season he has kept us in games."
Marcos Alonso's fine volley handed Chelsea a 1-1 draw with Leicester to secure a third-place finish in everything but mathematics.
Alonso had switched off to help James Maddison to rifle the Foxes into an early lead at Stamford Bridge, but delivered a sweetly-struck effort to level before the break.
The Blues boast a three-point advantage on fourth-placed Tottenham going into the campaign's final day, but a goal difference superiority of 18.
Christian Pulisic inexplicably missed a tap-in that would have sealed third place for the Blues with a game to spare.
Australian Associated Press
Sign up for our newsletter to stay up to date.