SPOILER ALERT: Do not read if you have not yet watched “Mayday,” the third season finale of “The Handmaid’s Tale.”

There has long-been a school of thought that in order to move forward, one must be willing to look back.

In the case of “The Handmaid’s Tale’s” third season finale, starting the episode entitled “Mayday” with a flashback to June’s (Elisabeth Moss) earliest moments after being rounded up alongside dozens of other women to be led to their new lives under the new regime offered Hulu’s dystopian drama a chance to show how far the titular heroine had come.

“Just the look on her face, the way she’s walking, the way she’s talking, the way she knows how to navigate the world within the world and get what she needs now, it was really that difference,” creator and showrunner Bruce Miller tells Variety of the opening moments. “She was walking into that world, and in the next scene she was walking through it with a larger amount of confidence.”

In a way, though, that opening flashback of June in a sea of other scared faces being forced into a new world also served as one of the bookends for the episode, juxtaposing the young girls’ concerned faces as June helped round them up and get them on a plane to Canada.

“I was thinking about, ‘What do you think about the morning of your big rebel event?’ She’s going through details but she’s wondering about if she’s going to be the weak link,” Miller explains. “And the monologue and what she sees in the past and the voiceover is about her trying to think about what it was about the men — the sons of Jacob that took over — that made them win, and it’s ruthlessness.”

All season long, Miller points out, June was learning to be a rebel, and much of what she learned was that she had to “be improvisational.” Her plan “doesn’t go off nearly the way she thinks it’s going to,” he admits, especially when Eleanor (Julie Dretzin) began talking about taking children and June feared she would blow the plans, as well as when another Martha brings a child directly to June’s doorstep, but then fears being found out.

“We needed to see someone who was not June act on those fears and doubts, so that’s why Maggie, who is that Martha, runs,” Miller says. He wanted to put June “in the situation where she knew what she had to do to give her plan the best chance of success and then see if she could do it.” That was why, even though he admits they were “very loathe to have a gun in a scene with a child, let alone to point the gun,” they wrote such a confrontation.

“I wanted to do it was that our reaction would be June’s reaction: She’s just as horrified as we are,” he says. “That was much more what the scene was about: It was much more a character pivot moment than it was an episode pivot moment because in the end she lets Maggie go, Maggie gets caught, and they almost all get caught because of that. It was a big mistake, and she learns from that mistake and that’s why she can put the bullet in the head of the guy with the radio.”

Both Miller and Moss note that June is has put other priorities ahead of her own safety at this point in the story. “In the end, I think she realizes that she has the blood of five people on her hands and there’s nothing left for her to do but to put herself in front of the line of fire,” Moss says.

But, that doesn’t mean she would have been content to die in the forest, having saved dozens of children but not her own eldest one. “I don’t think she thought about it,” Moss continues. “I think the only thing she cares about is getting those kids out because in some way that’s close to getting Hannah out. And I don’t think there’s that kind of rational thought.”

Similarly, Miller says June’s line of thought over who to put on the plane with the girls was solely focused on who would be best suited to help them. “When I’m looking around that group of people, there’s one person in that group I trust more than any other people, and that’s Rita,” Miller says.

For Amanda Brugel, who plays Rita, reading that her character would get such a heroic moment in the third season finale caused her to start “openly weeping.” While she knew she’d play a part in helping some get out of Gilead, she had no idea she’d be one to get to the other side, too. The idea both “thrilled” and “scared” her because she had only ever played Rita as a Martha, in that one costume, and with her touching down on a new land, the possibilities for where her story could go became endless.

“She gets her freedom back, and I don’t know what that looks like,” Brugel admits.

To prepare for the finale, Brugel says she did a lot of research about “families being reunited after they were separated at the border.” Sitting on set with the child extras on the plane also forced everyone involved to be confronted with the weight of the act. “The kids were wonderful, and they were really helpful to just look around and just tap into how wonderful it would feel to save one child versus 150,” she says.

What did take a long time for Miller and his writers’ room to work out was how to craft the scene where the plane touches down, the doors open, and the kids and Rita come out, interacting with characters who got out sooner, such as Moira (Samira Wiley), Luke (O-T Fagbenle) and Emily (Alexis Bledel).

“Moira wouldn’t know what Rita looks like, probably, but Emily does. So what you want to do is say, ‘Who could be there? How can I tie this together?’ Moira’s been working with refugees for a season and a half now, and certainly it was a sign that Emily’s getting up on her feet that she was able to be there,” Miller says.

While there are certainly some happy moments in the reunions, as well as Rita meeting Luke for the first time after having the shared connection of June for so long, Miller was also mindful not to lose sight of the bigger picture.

“The first thing I thought when you see little Rebecca reunite with her father is all the time they’ve lost, not the fact that they’re back together. They lost four years and she’s forgotten him until he calls her name,” he points out.

This is especially hard for Luke, who Miller says “feels guilty in a way that will never be assuaged, no matter what happens.” This season he had some more contact with his wife than in past years, but that made it harder for him to move beyond feelings “like he left his wife and daughter behind and didn’t look hard enough for them.”

And just as Serena (Yvonne Strahovski) was settling in up north and reveling in getting to spend some time with baby Nichole, Fred (Joseph Fiennes) turned on her and told Mark (Sam Jaeger) about crimes she committed by having June sleep with Nick (Max Minghella) to conceive the baby.

“We vetted all of that stuff very clearly with the UN and made sure her deal wouldn’t cover it,” Miller says of Serena’s arrest after she thought she had immunity. “A few years ago they added another category of crimes, which are sexual crimes. So now there are crimes against humanity — like genocide — and sexual crimes. And they’ve done it for exactly this reason: When they get somebody and they find out they’ve been committing all of these horrible atrocities, they have resources and a way to convict people of those crimes because they’re in a different category. She has immunity against the crimes against humanity, for all of the things that she did on a government level, but not the others. She wasn’t pushed into that by the regime, under penalty threat; it was just something she wanted.”

For a character as calculating as Serena to not have considered this a possibility and now be blindsided with it is just one complicated that Miller and his team will have to find a way to deal with in the fourth season. Back in Gilead, there will certainly be a lot to answer for — even if the Commanders don’t know who to blame for the missing children — as well.

“I just like to know that there’s one or two interesting ways out, and once I know that, I try to forget about it. I make sure I’m not putting myself in jail creatively, or in this case putting June in jail. I don’t necessarily need to know what game of tennis I’m playing, I just need to know I have enough balls to do it,” Miller says of the plan for next season.

But one thing seems clear: June had an even bigger taste of victory than in getting Nichole out at the end of Season 2, and she likely won’t stop now.

“She has priorities than her own personal survival at this stage. So it’s not that she’s decided she’s going to die in Gilead, but if she dies in Gilead, it’s OK,” Miller says.

Anna Tingley contributed to this story.