Over the course of its nearly 600 episode run, The Simpsons has had a number of legendary musicians pass through its doors, but the chance to feature the late Prince is one missed opportunity the writers have seemingly not forgotten.

In case you don't know the story: Years ago, Simpsons writer Mike Reiss revealed on DVD commentary that there had once been a script for an episode meant to showcase the "Purple Rain" singer — not unlike the one about Michael Jackson, Season 3's "Stark Raving Dad."

The episode, known merely as "The Prince Episode," would have featured a return from mental patient character Leon Kompowsky, famously guest voiced by Jackson under a pseudonym — only this time, Leon would believe he was Prince.

Prince reportedly was not a fan of the script, so then-Simpsons writer Conan O'Brien did a rewrite of the script. Sadly, no progress was made. A long back-and-forth eventually led to the episode never being made. End of story — until Saturday, however, when executive producer Al Jean unveiled some never-before-seen script pages from the episode.

These are from O'Brien's re-write of the script, Jean said, and it's clear the premise had undergone some changes by this point.

Jean confirmed the script was written for an episode intended to air in Season 4 or 5.

.@TheSimpsons page from unproduced Prince script thank you Jacqueline Atkins for finding! pic.twitter.com/GvYaJKXxgD — Al Jean (@AlJean) April 23, 2016

In one shared page, Lisa tries but fails to score some coveted tickets to a Prince concert happening in town. In another, Marge's sister Selma hits it off with Prince by complimenting his movies — even some of the lesser known hits.

Jean joked the jabs at his films may have been "possibly another objection Prince had to the script."

.@TheSimpsons possibly another objection Prince had to the script... pic.twitter.com/OgRxlZ5EKJ — Al Jean (@AlJean) April 23, 2016

Even though Prince never made it to Springfield, over the years, the show has had nods to the singer, who died Thursday at his home.

An animated version of Prince briefly appeared in a Season 7 episode of 'The Simpsons,' but years earlier, the show's writer had tried to score the singer for a guest spot in a full episode. It never worked out. Image: FOX

In Season 7's "Radioactive Man," for example, Prince was seen in a montage of people digging for scoop about the upcoming Radioactive Man movie. He also appeared in Season 20's Treehouse of Horror episode.

And in another episode — in a moment widely circulated this week in wake of Prince's death — Milhouse makes a reference to "When Doves Cry" upon meeting his Shelbyville counterpart.

Same, Milhouse. Same.

Have something to add to this story? Share it in the comments.