The following contains spoilers for The Sandman Season 1, now streaming on Netflix.

The Sandman #6 (by Neil Gaiman, Mike Dringenberg, Malcolm Jones III, Robbie Busch, and Todd Klein), aka "24 Hours", is widely regarded as one of the darkest and most terrifying issues of the entire series. This is all thanks to the horrifying actions of the main villain, John Dee. While the Netflix show presents John as a run-of-the-mill psychopath in sheep's clothing, in comics, the character is a long-time foe of the Justice League. He is known as Doctor Destiny, and he possesses the ability to bring people's dreams and nightmares to life.

Driven by a deeply-rooted grudge against the Justice League, most of Doctor Destiny's appearances before and after Crisis on Infinite Earths portray him as one of the team's deadliest adversaries. However, 1996's Justice League: A Midsummer's Nightmare #1 (by Mark Waid, Fabian Nicieza, Jeff Johnson, Darick Robertson, John Holdredge, Anibal Rodriguez, Pat Garrahy, and Ken Lopez) saw him bring together one of the most famous incarnations of the Justice League to save himself from a nightmare of his own making.

RELATED: See the Surprising Comic Book Origins of The Sandman's Matthew the Raven

Doctor Destiny with his ruby in DC comics

The issue opens on a radically different version of the DC Universe where all of DC's heroes led seemingly average lives as their secret identities with no memory of their past adventures. Meanwhile, a phenomenon known as "genetic sparking" was causing people around the planet to develop superpowers. Powerless individuals were slowly becoming a minority as conflicts between newly-awakened metahumans began to break out in major cities all over the world.

Amidst this growing crisis, Batman and Superman were suddenly confronted with bizarre situations that less than subtly referenced their origins, snapping each of them out of their amnesia. Meeting up in the Batcave, the World's Finest deduced that someone had placed them and the rest of the world into a carefully constructed waking dream. With the worldwide war between metahumans worsening by the minute, the duo woke up the core members of the Justice League.

The newly assembled Justice League quickly realized that their current situation matched Doctor Destiny's MO. They also noticed that their foe had deliberately freed them from their mental conditioning and provided them with clues to his location. Expecting a trap, the Justice League tracked Doctor Destiny to his lair in a heavily fortified secret facility in Montana. The heroes fought through traps specifically tailored to their respective abilities, only to find the villain strapped to a device that torturously amplified his dream-based abilities and begging for help.

RELATED: How Closely Does Lucifer of Netflix's Sandman Resemble Their Comics Counterpart?

Doctor Destiny Justice League A Midsummer's Nightmare

Once freed, Doctor Destiny revealed that the plot to transform the people of Earth into metahumans wasn't his own. The true mastermind had approached him in a dream and offered him the chance to create a world where the Justice League would be obsolete. Unfortunately, he was eventually betrayed and imprisoned after realizing that his new "partner" saw him as nothing more than a tool. At that moment, the true mastermind, Know Man, revealed himself.

Know Man was once a Neanderthal who'd been given immortality by a villainous off-shot of the Guardians of the Universe known as the Controllers. He explained that his "creators" had tasked him with creating an army that could stand against a prophesied cosmic threat. Believing that the Justice League's desire to emulate humanity made them weak, Know Man used Doctor Destiny's abilities to fulfill his dream of giving humanity superpowers while allowing the Justice League to live out their dream lives as "mere mortals."

Determined to see his plans through, he trapped the Justice League in illusions of their worst nightmares. However, Doctor Destiny used his remaining strength to help Martian Manhunter save his comrades and foil Know Man's ambitions. As the world around him slowly returned to normal, Doctor Destiny admitted that he couldn't handle being in control of the planet and was happy to finally wake up from the nightmare he helped create.

RELATED: Superman Managed to Resurrect the Justice League Before He Died

An image of comic art depicting the Justice League in A Midsummer's Nightmare

While Justice League: A Midsummer Nightmare has largely faded into obscurity, the miniseries was a turning point in the Justice League's history. By bringing the "Big Seven" together for the first time in years, it brought the era of the Justice League International to a definitive end. A few months later, Grant Morrison and Howard Porter began their seminal run on JLA, which abandoned the focus on the newer, less-powerful characters that'd defined Justice League International and brought more powerful and recognizable heroes back onto the team.

In many respects, the Justice League that emerged from Justice League: A Midsummer Nightmare was the greatest incarnation of the team in its history. Almost every version of the team that succeeded it followed the example it set. All of this makes it even stranger to think that this rebirth of DC's flagship team would never have happened if it weren't for Doctor Destiny, a man who has tried to destroy the Justice League time and again.