[Editor's note: The following contains spoilers for Lucifer, Season 6 Episode 8, "Save the Devil, Save the World."]

After a history of multiple cancellations and revivals, the finally final season of Lucifer functioned as an extended goodbye to the show's well-loved fallen angel turned nightclub owner/crime-solver turned heir to the throne of God. As part of that, showrunners Joe Henderson and Ildy Modrovich devoted one of their final episodes to presenting a fun meta look at the characters and how they see each other, and themselves — which, they explained, was directly inspired by the writers' own fandom for a very different show.

In Episode 8, "Save the Devil, Save the World," Lucifer (Tom Ellis) is ready to ascend to God-hood, except that his wings aren't cooperating. So, in a search for answers as to why that's happening, he asks his friends to dig through the unpublished first draft of the manuscript his therapist Linda (Rachael Harris) has been writing about their time together. While reading her depiction of these characters (as dramatized by episode writer Aiyana White and director D.B. Woodside), everyone is distressed by the way they've been depicted — because, of course, it's very different from how they actually see themselves.

RELATED: 'Lucifer' Showrunners Break Down the Biggest Moments of the Final Season, and Reveal the Original Ending

According to Henderson, the idea for this storyline came not just from the beloved Nickelodeon fantasy series Avatar: The Last Airbender, but very specifically from the Season 3 episode "The Ember Island Players."

"All the characters go to a play and they watch themselves being dramatized onstage. And you get all of these in-jokes in the sense of how other people see them," Henderson said to Collider in a recent interview. "[Executive story editor] Jen Imada and I in particular were obsessed with that. And then with Aiyana and Ildy and everyone else, we started to actually turn it into 'what's our version of it?' How do we have a love letter to the show? How do we play with breaking the rules a bit, but also maintain the rules? And the answer was [Linda's] book."

As he continued, "So it became, okay, if the book is our device, let's play with perspective, let's play with how everyone saw different moments happening and try to find a way to explore each one. Like here's how Lucifer sees the world. Here's how Dan and Maze see the exact same scene, but from different perspectives... That was super fun, because it's our love letter episode."

lucifer-season-6-image
Image via Netflix

For the record, while it feels like the episode is relatively self-contained, it isn't technically a bottle episode — and it wasn't any cheaper than other episodes made that season. Modrovich noted that Woodside, a series regular making his directorial debut with this episode, "found lots of ways to add money onto there."

But, she explained, that was all in service to the episode: "The part where [Amenadiel] flies and he does this amazing spin thing, it was great. That was all D.B. That was all his vision. He also shot sets that we've seen a million times in a way that I'd never seen — like for instance, Linda's office, he created this whole thing where we went outside the office and he did this one-er, where the camera's outside and Lucifer and Linda are arriving and it's late at night and she's turning on lights and you're like a voyeur outside. It's a fantastic shot."

The end result was a charming tribute to a series that has been sustained for the last six seasons by its devoted fandom — the best sort of parody, where everyone involved is in on the joke.

Lucifer is streaming now on Netflix.

KEEP READING: 'Lucifer': Tom Ellis Breaks Down the Final Season's Most Wild Choices, and Reveals What He Wants to Do Next