Sonic the Hedgehog, the turbulent big-screen adaptation of the popular Sega speedster, has a gorgeous credit sequence that’s worth sitting through. A recap of the entire plot done in the 16-bit art of the Genesis game, the sequence revives Sonic in his original form and renders Jim Carrey’s Robotnik as a pixelated foe. Oh, and there’s a post-credit scene that you probably saw coming from a mile(s prower) a way.

[Ed. note: The rest of this post contains major spoilers for Sonic the Hedgehog.]

After sending Dr. Robotnik through a portal to the Mushroom Hill Zone, Sonic and his pal Tom (James Marsden) settle back into their new-old life in Green Hills, Montana. Everything is peachy! But after the credits roll, we get one more shot, looking out from the top of a mountain. A portal opens and — surprise! — it’s Sonic’s pal Tails, the fox with two tails. He bursts out of the open ring like Marty McFly in Back to the Future 2, racing to find Sonic to save the day from ... something. Considering we saw a pack of Knuckles-like echidnas chasing Sonic early in the movie, and Robotnik (now mirroring his wacky self from the games) is collecting the fungi he needs to escape solitary confinement, the plot of Sonic the Hedgehog 2 is in full view by the time Sonic the Hedgehog 1 calls it a day.

Miles “Tails” Prower has been a mainstay of the game franchise since 1992’s Sonic 2, and became Sonic’s go-to escape plan thanks to two fluffy tails that could spin like a helicopter. The Sonic movie keeps those powers intact for future use in a sequel, but doesn’t spend much time establishing Tails as a part of the larger universe. Anything seems possible in the world of the movie — Sonic grew up under the wing of an enormous owl named Lockjaw, after all — but one has to wonder how a hedgehog and a fox became pals on an alien world where not even echidnas can get along.

Tails, surprisingly, has a canonical backstory in the Sonic games. As Al Nilsen, the former Director of Marketing at Sega of America, tells Polygon, the character began was the idea of Japanese developers, who were inspired by kitsune, the foxes of Japanese folklore. When Nilsen and his team caught wind of the little fox with two tails, their sales pitch to American audience became obvious.

“We wanted to show you the closeness to Sonic and how he was Sonic’s friend,” Nilsen says. “The look of the character was very much Tails kind of saying, ‘I want to be just like Sonic.’ Or ‘I’m a young kid.’ [The design gave us the ability to put] the marketing spin behind what the game designers have done. But they have to go together. You know, you can’t go and now make them something that they’re not on screen.”

There was one hang-up: designer Yasushi Yamaguchi and the Sega of Japan team really wanted to name their new fuzzball “Miles Prower.” The Sega of America team had a hard time imagining that on a poster.

“While it was it was a nice pun on “miles per hour,” Nilsen recalls, “it just didn’t feel like a cool name. Or something easy to remember.”

So Sega of America pitched the Japanese team on an alternative: Tails. Because, you see, he had two tails. The developers didn’t budge. So they went back and forth and back and forth, neither side convincing the other of why their name mattered more. The eventual solution was to use both. And in order to appease all parties involved, Nilsen and his team wrote an intricate backstory for Tails that would canonize his complete name.

As printed in full in Blake J. Harri’s Console Wars, here is “The Renaming of Miles Monotail”:

This is the story of Miles Monotail. Miles was your average four-year-old fox. He loved to play with his friends, but his friends weren’t really his friends. Whenever they saw Miles, they laughed and made fun of him. Why? Well, Miles wasn’t like all of the other foxes. Miles Monotail had two tails. And as kids tend to do when someone is different, they made fun of him. It didn’t help that Miles sometimes tripped over his second tail and went rolling down the hill. coordination was not one of Miles’ virtues. Because of the rough time that his friends gave him, Miles became very depressed. One day he was walking along with his head hanging down when a blur and a whoosh crossed his path. There’s only one person that could be moving that fast, and that is Sonic the Hedgehog. Miles thought Sonic was the greatest person in the world. Miles wish that he could be as cool and coordinated as Sonic was. And, most of all, he wanted to meet Sonic. This was his big chance. Miles took a deep, deep breath and at the top of his lungs yelled out, “SONIC!” The blur that was Sonic turned around and stopped in front of Miles. “You called?” said Sonic. ”Oh, Sonic, you’re my hero,” exclaimed Miles as he ran around and around Sonic. Well, you can guess what happened next - Miles tripped over his second Tail and fell down. Tears came to his eyes. ”Hey, cheer up little fellow. What’s the matter?” said Sonic. ”Sonic, I want to be just like you, but I’m a freak. I’ve got two tails.” Sonic leaned over to Miles and said kindly, “You’re no freak. You’re more special than anyone because you have something that everyone else doesn’t have. And you can do things that they can’t. If anything, your friends should be jealous of you.” “But I can’t do anything special,” cried Miles. “Oh yes you can,” Sonic said. “I’ll show you. You’re about to enter Sonic’s special training camp.” Well, Miles couldn’t be happier. His hero took him under his wing and started teaching Miles how to use his two tails to his advantage. He showed Miles how to curl his tails up under his body so that he was like a very aerodynamic ball and could do Sonic’s famous Supersonic Spin. Sonic then taught Miles how to use his two tails as a helicopter rotor so that Miles could fly around. Even Sonic couldn’t do that. Needless to say, Miles was ecstatic. He was special, and when his friends saw what Miles could do and what they couldn’t do, they became very jealous, but also every single one of them wanted to become Miles’ best friend. But Miles had a new best friend. Someone who believed in him. Someone who was his hero. And that friend was Sonic. Sonic was happy that he could help his buddy gain new confidence and new abilities. ”See, Miles, you ARE special because you have two tails. And because of that, I’m going to give you a very special nickname. From now on, I’m going to call you Tails because you should always be reminded that you are special because you have two tails.” So from that day forward, Miles Monotail became known as Tails.

Nilsen says Miles “Tails” Prower was just as popular as Sonic after his introduction in Sonic the Hedgehog 2 — and they knew because of 1-800-USA-SEGA. “[In marketing,] a lot of the immediate feedback that we got was from the Sega 800 line,” he says. “The game counselors, they would hear things and if something wasn’t liked or something didn’t work, they were the first ones to go and tell us.” They only heard praise, so the rest was history.

Tails would go on to become a playable character in the Sonic games, get his own spinoff in the form of Tails Adventure, appear in the Sonic comic book and two Sonic cartoons from the ‘90s, and appear in all the later incarnations through Sonic Mania. Now we get the high-flying sidekick in Sonic the Hedgehog. But one question remains: what will his name be in the movie lore?