The following contains spoilers for Spider-Man: Across the Spider-Verse, now playing in theaters.

Spider-Man: Across the Spider-Verse references a lot of the Wall-Crawler's history from across the multiverse. The film takes cues from different stories and various versions of the classic characters to tell a unique story that still touches upon many of the same tropes and themes of Spider-Man. But there's one surprising story in particular that serves as a precursor to the film's big final twist -- and teases the danger it may pose to the heroes.

Across the Spider-Verse introduces a dark cinematic version of Miles Morales, who became his world's Prowler instead of turning into Spider-Man. However, this isn't the first time a version of Miles has come up against a villainous variant. The storyline takes some cues from Spider-Men II, adding a more personal layer to the story in the process.

RELATED: Spider-Man: Across the Spider-Verse Warns Fans About Incoming Spoilers

How Across the Spider-Verse Introduces an Evil Miles Morales

Miles Morales looking at his hands in Across the Spider-Verse

The ending of Across the Spider-Verse sees Morales on the run from many of his allies. Revelations about the Canon Points and the seemingly inevitable death of Miles' father have pushed him to splinter away from the Spider Society, barely escaping their base of operations. But his attempts to return to his own timeline don't go as planned, as he doesn't return to his own world, instead landing on Earth-42. This is the world where the spider that bit him hails from, a reality that has subsequently been left bereft of a Spider-Hero of any sort to save the day.

As he tries to adjust to this new, unfamiliar world -- especially the fact that his uncle, Aaron, is still alive while his father isn't -- Miles is knocked out and captured by a mysterious figure. This turns out to be the Prowler of this world, who is actually the Miles of Earth-42. This dark version of Miles has seemingly embraced the criminal direction his uncle had long been on and seemed unimpressed with his heroic counterpart. This is a shocking discovery for Miles, but one that actually has precedent in the original comics.

RELATED: Across the Spider-Verse Confirms Andy Samberg Is Scarlet Spider

How Across the Spider-Verse Pulls From Spider-Men II

Evil Miles Morales looking angry in Marvel Comics.

In the Marvel Universe, the Miles Morales most fans recognize actually originated within the Ultimate Universe. A young hero who followed in the footsteps of his world's murdered Peter Parker, Miles became a hero in his own right before eventually making the transition to Earth-616 following the events of Secret Wars. But the original Miles of Earth-616 was still alive and had a far darker story. As revealed in Spider-Men II (by Brian Michael Bendis, Sara Pichelli, Justin Ponsor and Chris Eliopoulos), the Miles of Earth-616 was born years earlier than his Ultimate counterpart and fell into a life of crime from an early age. Becoming an associate of the Kingpin, this Miles became a dangerous killer who eventually escaped to a timeline where his beloved wife wasn't dead. He confronted both Peter and Miles in Spider-Men II and eventually became the reality-hopping villain known as Ultimatum.

Across the Spider-Verse taking cues from Spider-Men II is an interesting concept, and it approaches it with a more closely-tied connection than the comic. The Prowler connection is a strong plot turn and one with more emotional heft than the Earth-616 Miles being friends with Kingpin. It's possible the Kingpin of Earth-42 is still alive and even thriving in a world without Spider-Man, meaning that the Prowler may still have a connection to Wilson Fisk. But this additional layer gives him a reason for approaching their conflict from a harsh place. A villainous Miles has also proven to be a very deadly threat over the years.

RELATED: Across the Spider-Verse Projected to Double the First Film's Opening Box Office

Especially when he became Ultimatum, evil Miles proved to be a very resourceful and ruthless threat, and the Prowler seems to have similar characteristics. They also serve as specific foils to their heroic versions of Miles, highlighting how easily the younger Spider-Man could have ended up on a far darker path. In any case, if Spider-Men II and the ensuing stories about the evil Miles are any indications of where things may go next for the cinematic Miles, then this villainous Miles might end up with a ruthless edge that could be difficult to overcome.

To see Miles face off with his darker counterpart, check out Spider-Man: Across the Spider-Verse, now playing in theaters.