Last week’s episode of The Mandalorian Season 2, titled “The Jedi,” offered a number of revelations, but the biggest was the casting of Rosario Dawson as fan-favorite character Ahsoka Tano. Rumors have swirled for some time that Dawson may be making an appearance on the live-action Star Wars series as the beloved character, who until now has only appeared in animated form on The Clone Wars and Star Wars Rebels. Those rumors were confirmed last Friday with the release of “The Jedi,” in which The Mandalorian tracks down this Jedi Ahsoka and asks her to help him train Baby Yoda.

The casting turned out to be pretty perfect. While there were those who lobbied for Ashley Eckstein, who voiced the Ahsoka character on the animated shows, to fill the role, Dawson kind of nailed it right out of the gate. And now, in the first interview with anyone involved in The Mandalorian Season 2 thus far, Dawson and executive producer Dave Filoni are pulling back the curtain on how this all came to be.

As part of an extensive (and insightful) interview with Vanity Fair, Dawson revealed that her turn as Ahsoka all began on the internet, where she retweeted a fan casting her as Ahsoka. Someone at Lucasfilm saw it, and the rest is history:

"Actually it first came from fans online. Someone tweeted me and fancast me. I retweeted back and I was like, ‘Absolutely, yes please" and ‘#AhsokaLives.’ And apparently that got the attention of someone who has been doing the Star Wars press for years. She forwarded it to Dave Filoni. That kind of started a whole thing. I was like, ‘Oh my goodness, did I just get fancast in something?’ And then nothing happened.”

Filoni said in the same interview that when he saw that tweet, he wasn’t even yet working on The Mandalorian. But he kept this idea in his back pocket until the time was right:

"That was the first time and I looked at Rosario and I thought, ‘Huh. Yeah, I think maybe she would make a good Ahsoka.’… I was still trying to figure out how to get off Tatooine myself at that point. But when I started working with Jon [Favreau], I’d bring up the character and he's like, ‘Well, who are you thinking of playing her?’ I said, ‘Well, Rosario Dawson's top of my list,’ and he's like, ‘I know her!’ So immediately that starts to fit really well.”

Image via Lucasfilm/Disney

Dawson reveals she got the call asking her to play Ahsoka before a single episode of The Mandalorian had debuted, so Filoni and Favreau were already hard at work planning out Season 2 before Season 1 had even aired:

“They were just about to drop the first one, and they had all of this art that had me as Ahsoka. They had already been preparing, knowing that they wanted to have her be a part of a story in the second season. They'd just been visualizing me in this role that whole time, and it was mind-boggling.”

Remember that viral photo of George Lucas on the Mandalorian set holding Baby Yoda? As it turns out, just out of frame Dawson was on set that day in full Ahsoka costume and makeup. That’s how long they’ve been keeping this a secret.

You can read much more about Dawson’s casting and bringing Ahsoka into the live-action realm over at Vanity Fair. And for a breakdown of Ahsoka’s history in the Star Wars universe thus far, click here.