Adam Sandler was fired from Saturday Night Live but it's safe to say he truly had the last laugh.

The comedy legend's triumphant return to SNL received six total Emmy nominations on Tuesday, the most for any single episode of the NBC sketch comedy series. Overall, Saturday Night Live earned 18 nominations, including Outstanding Variety Series.

But Sandler's episode was the standout from the season that was: in addition to Sandler himself, who was nominated in the Outstanding Guest Actor in a Comedy Series category, the May 4 episode landed citations for Outstanding Directing for a Variety Series, Outstanding Hairstyle for a Multi-Camera Series or Special, Outstanding Makeup For A Multi-Camera Series Or Special (Non-Prosthetic), Outstanding Music Direction, and Outstanding Technical Direction, Camerawork, Video Control for a Series. (The John Mulaney episode netted four total nominations, including a Guest Actor nod for Mulaney himself; other Guest Actor and Actress nominees from SNL included Matt Damon, Robert De Niro for his turn as Robert Mueller, Sandra Oh, and Emma Thompson.)

Emmy Nominations 2019: See the Full List

The Sandler episode of SNL earned some of the show's highest ratings of the last year and generated tons of pre- and post-show buzz. Sandler was fired from Saturday Night Live in 1995 and while he had participated in the franchise's 40th anniversary special in 2015, the Happy Gilmore actor had never hosted before this year.

Previously, Sandler said he would not necessarily want to host the show, telling fellow former cast member Norm MacDonald in a 2014 interview, "Why should I [host]? I don't know how good it would be. I'm slow now. ... There are guys who love doing it — who are great at doing it. I just don't know how good I'd be doing it. I did what I can do on the show."

Sandler opened his episode by referencing his infamous ouster in a song: "I was fired, I was fired, I was fired so sad to tell. Well, I never saw it coming, I got fired from SNL. Between seasons I heard a nasty rumor that I was getting the sack. I tried to call Lorne Michaels, but he never called me back."

Sandler's episode also featured a touching, heart-wrenching tribute to his friend Chris Farley, who was similarly fired from SNL in 1995. Farley died in 1997 from a drug overdose.

While the SNL version of the "Chris Farley Song" was not recognized by the Emmys, the track itself, in a roundabout way, was: the song made its debut on Sandler's Netflix comedy special 100% Fresh, which scored Sander a nomination in the Outstanding Writing for a Variety Special category.

See the full list of 2019 Emmy nominations here.