Crisis on Infinite Earths came to an explosive, Easter Egg-filled and ultimately fatal conclusion last night as five hours of CW superhero crossovers culminated in the rebirth of the multiverse and the permanent death of the Arrowverse's O.G., Oliver Queen (Stephen Amell).

While the rest of his costumed peeps dispatched an army of Shadow Demons during a massive battle at the dawn of time, the one-time Green Arrow—now Spectre—took on with the Anti-Monitor (LaMonica Garrett) in a zap-off that would make Harry Potter and Voldermort proud. At the end, however, it was Oliver who sacrificed himself to "light the spark" that would erupt into the new array of Earths.

The morning after the episodes aired, on his way to work on the new season of Legends of Tomorrow, executive producer Marc Guggenheim hopped on the phone with us for a quick chat about why they offed the star of Arrow two episodes before the show's series finale, as well as how they wound up incorporating a perfectly executed appearance by the DC Cinematic Universe's Flash, Ezra Miller, into the action. And yes, we even got some news on Emily Bett Rickards' return. So have at it!

OK first off, how did the Ezra Miller moment happen?

Marc Guggenheim: Well, I'll tell ya, we were wrapped on production of the crossover, all of the episodes were soft-locked. I'm driving to work one day and I got a phone call from [Warner Bros. head] Peter Roth, who says, "You're not going to believe that I'm asking this and I know you're wrapped, but would it be possible for Ezra Miller to be in the crossover?"

And I said yes, but then he asked how. And I said "I have no earthly idea, you just told me about it, but if you tell me that I have the opportunity to have Ezra Miller in the crossover, I am going to tell you right now, we are going to make it happen." And [EP] Greg Berlanti's first instinct was, and which I agreed with, that it should happen in the Speed Force. Our two Flashes should meet in the Speed Force.

And that that was really helpful because we already had Grant Gustin's Barry traveling through the Speed Force in hour four, which worked great because it was later in the cycle. That was a lot easier to work into the last two hours in the crossover because we had a little bit more time. I knew it would be a two-hander and I knew it'd be like a minute-and-a-half long, so I thought, okay, well we can shoot with The Flash crew ... and so I wrote the scene, and you know, went back and forth with the theatrical [team] about it.

I gotta tell you, the very first thing I did after I got off the phone with Peter Roth was to reach out to Eric Wallace, the Flash showrunner, and he reached out to Grant Gustin. Because the one thing that we knew was, we were not going to do this unless Grant was 100% on board. And he was, he was incredibly excited and incredibly enthusiastic about it.

And then the second thing we did, of course, was get on the phone with Ezra Miller, who, by the way, could not be more delightful and not be more of a fanboy. I mean, he's quoting Tolkien to us on the phone...his geek cred runs very, very, very deep and he was an absolute delight on set. We just had the best time. I think everyone just really, really enjoyed the whole process and I think it shows on screen.

Oh it was a blast. But then, on the clip side of this fun moment, you go and kill Oliver two episodes before Arrow ends.

That was always the plan. Ever since once the stars aligned and we knew that we were doing Crisis in Arrow's last year, we knew several things. We knew that Oliver had to die in Crisis, as we've been saying for a year now. And we also knew that it had to happen in the Arrow hour of the crossover. So we definitely created some interesting creative challenges for ourselves in terms of what the final two episodes would be, particularly the Arrow series finale. But those challenges really are creative opportunities.

So you come back and you have the Canaries episode...

Yeah, we come back with the Canaries. And actually, here's the thing, Stephen's deal was always for nine episodes. The CW asked us for a 10th episode and we realized that [an extra] episode could be a backdoor pilot, right? We were never going to have 10 episodes with Stephen. He was always going to be in nine episodes and then we were able to fill in that gap by doing a backdoor pilot. So it all kind of worked out quite nicely.

Can you give me a hint as to what the series finale would look like?

Ok, how do I do this without spoiling anything? So it wraps up a key number of storylines and it honors Oliver and the sacrifice he made. I guess...this is the thing I'll say: Once we knew that we were killing off Oliver in the Arrow hour of the crossover, we knew that the series finale would be something of a coda and we knew how we were wrapping up the storylines, but I think what we were kind of lacking was a central theme. Then I was in the editing room on an episode, and I'm watching for the umpteenth time the [opening sequence] where Oliver always says, "I came home with only one goal...to save my city." And I realized, "Oh, that's the series finale." Oliver's sacrifice has allowed him to save the city.

So we end the show with the fulfillment of the mission that we've been stating in almost every episode since the very beginning. And once that piece fell into place, the whole finale coalesced around that central theme and I'm really, really proud of that. Beth Schwartz and I had a wonderful time writing it, James Bamford directed the crap out of it and all of the actors brought their A-game. And Emily Bett Rickards returns, which is really the only way we could have ended the series.

We've been finished with it for a while, it's been written for a few months now and it has stuck with me in a way that very few episodes we've done have. I hope people like it. It's an unconventional kind of series finale because a protagonist died two episodes earlier. But I think it's a very satisfying.

Cool. For the crossover, you had so many appearances. Did you try to get Krypton's Cameron Cuffe to play Seg-El?

Generally speaking, I don't like to comment on who I tried getting into or didn't. But he was either going to be in a movie or auditioning for a movie and couldn't make the schedule. We'd actually written something and he was going to make an appearance in hour one, the Supergirl hour, appropriately.

Okay. And why not just stick with one universe?

Why restore the multiverse at the end? Because I promised DC Comics that if they let me destroy all their universes in hour one, that I would bring them back. You know, Titans and Doom Patrol and Stargirl, they kind of want to exist. [Laughs]

I know you have to go, so last question...are there any new heroes on Earth-Prime that we should know about?

Actually, that's the great thing about what we've set up here. There were still a lot more surprises because everything has changed . I think one of the things that make us all really excited about the post-Crisis episodes is that, across all the different shows, we're going to be peeling the layers of that onion. So I don't want to spoil anything, but what we've done is we've created an opportunity for a whole lot of stories across the entire Earth-Prime world.

Arrow, Tuesdays, 8/7c, The CW