SPOILER ALERT: Do not read on unless you’ve seen “Arrow” Season 5, Episode 8, titled “Invasion!” which aired on Wednesday, Nov. 30.

In this era of “Peak TV,” guiding a show to 100 episodes is no easy feat. Tonight’s episode of “Arrow” had the unenviable task of being the middle installment to a three-part crossover, while also being a celebration to the 99 episodes that came before.

“That was the challenge — how much to service the 100th episode and how much to service the crossover,” executive producer Marc Guggenheim said at a press event with Variety in attendance, following a screening this week. “It’s pretty obvious that we chose to go 100th episode.”

Guggenheim said it was Greg Berlanti who came up with the idea to separate Oliver (Stephen Amell), Diggle (David Ramsey), Thea (Willa Holland), Sara (Caity Lotz) and Ray (Brandon Routh), and drop them into the Dominator “matrix.” In the episode, the five characters find themselves put into an ideal world — one where Oliver’s parents are alive and he’s set to marry Laurel (Katie Cassidy). The parallel that jumps to mind is “It’s a Wonderful Life,” but Guggenheim had a more DC-appropriate connection.

“This was, sort of, Oliver’s version of ‘Flashpoint’ or ‘For the Girl Who Has Everything’ from ‘Supergirl,'” he said. “There’s a reason why these stories are iconic or familiar tropes in comic books. When you show the protagonist the path-not-taken — and you basically put them in a situation where they can choose to stay on that path or go back to their life with all its ugly aspects — and they choose the selfless choice, it makes your character stronger.”

Guggenheim said this Elseworlds-like story will strengthen Ollie’s resolve heading into next week’s midseason finale.

“Oliver has a new sense of purpose,” he said. “The events of [episode] 508 forced him to emotionally double down on his mission. He also has a reaffirmation of his bond with Thea, because they chose each other.”

Executive producer Andrew Kreisberg said the episode was extra special because so many former cast members returned.

“It was getting the cast, getting Jamey Sheridan, getting Susanna Thompson,” Kreisberg said. “Our first mission was to make sure we locked in those cast members, and we were fortunate enough that everyone who has left the show was so excited to come back.”

Chief among those returns was Cassidy, who played Laurel Lance, a.k.a. Black Canary, who was killed last year in a fight with the season’s villain, Damien Dahrk (Neal McDonough).

“She’s such an essential figure to the show,” Kreisberg said. “She was the second lead on the show, and even though the show evolved, Laurel was at the heart of it — she was Oliver’s great love, she’s Sara’s sister, she’s Lance’s (Paul Blackthorne) daughter. Even if we get to 200 episodes, Laurel will always be at the heart of the series.”

The Arrowverse crossover continues on Thursday with “Legends of Tomorrow” at 8 p.m.