Everton will officially be a Premier League team next season.

For weeks, it looked as if the Merseyside outfit would drop out of the top-flight for the first time in over 70 years.

But crucial wins at home to Chelsea and away at Leicester City put them in a great position to avoid relegation.

And Everton mathematically secured survival on Thursday evening thanks to a dramatic 3-2 victory over Crystal Palace.

Frank Lampard's side actually fell 2-0 behind thanks to first half goals from Jean-Philippe Mateta and Jordan Ayew.

The Toffees rallied in the second half, though, with Michael Keane and the in-form Richarlison levelling the scores at 2-2 by the 75th minute.

Dominic Calvert-Lewin then fired Everton in front with just five minutes left of normal time, a strike that sparked wild scenes inside Goodison Park.

Premier League Final Day: Predictions, Scenarios and More

LIVERPOOL, ENGLAND - MAY 19: Dominic Calvert-Lewin of Everton scores their sides third goal during the Premier League match between Everton and Crystal Palace at Goodison Park on May 19, 2022 in Liverpool, England. (Photo by Michael Regan/Getty Images)

LIVERPOOL, ENGLAND - MAY 19: Dominic Calvert-Lewin of Everton scores their sides third goal during the Premier League match between Everton and Crystal Palace at Goodison Park on May 19, 2022 in Liverpool, England. (Photo by Michael Regan/Getty Images)

A small number of fans invaded the pitch after the ball rippled the back of the net, despite the fact the game was not over.

Calvert-Lewin and some of his teammates charged over to the stands to celebrate, although Richarlison opted against doing that.

Instead, the Brazil international decided to perform a comedic head dive right by the touchline and the footage of it is absolute gold.

Check it out here...

Video: Richarlison's celebration for Calvert-Lewin's winner

The still photos of Richarlison flat out on the turf will almost certainly be a meme for the foreseeable future.

Calvert-Lewin's winner was just the striker's fifth Premier League goal of the 2021/22 season and it may very well prove to be his last in an Everton shirt.

He has been heavily linked with a move away this summer. Arsenal - the team the Toffees play on the final day of the season - are a possible destination for him.

If Calvert-Lewin does leave, he can certainly say that he bowed out in style and also paved the way for an iconic celebration by Richarlison.

Premier League quiz: 20 questions on the division's all-time records