[This story contains spoilers from the series finale of NBC’s This Is Us, “Us.”]

A major feat of This Is Us has been how the hit NBC family drama manages to travel through time. Whether jumping ahead or flashing back, the nonlinear series, across the span of six seasons, has traversed decades in order to tell the Pearson family story from emotional beginning and middle to end — and, in its series finale, the show even managed to leave viewers with a hopeful vision of the future.

The time-jumping meant that three sets of actors had to be cast to play the Big Three siblings who are at the center of the story, played as adults by Sterling K. Brown, Chrissy Metz and Justin Hartley. Which is why, when creator and writer Dan Fogelman figured out his ending, he had to decide when to film it.

In the series finale, titled “Us” and written by Fogelman, the episode plays out in two timelines. In the present/future timeline, the Big Three are laying mother Rebecca Pearson to rest, after her penultimate episode goodbye, “The Train.” Then, in the flashback timeline, Rebecca and Jack (Milo Ventimiglia) are having what Fogelman describes as a “simple day in the life” with their younger children — a rare Saturday with no plans that becomes an opportunity to create the little moments around which the show is based.

“I always knew that this would be the ending and that the second-to-last episode would end with Rebecca passing away and then the last episode would be a simple day in the life,” Fogelman explained during a This Is Us finale screening and panel over the weekend, attended by The Hollywood Reporter.

Speaking to THR ahead of the panel, Fogelman elaborated about the “slice of life in the day of a family,” which he likened to viewers coming upon found footage of the Pearsons.

“[The flashback tells] a really simple story to make people think of their own families and the stuff that we forget to sit inside of and be present for,” he explained. “And then, hopefully, give a message at the end to speak to anybody who worries about mortality or has lost anybody, which is that just because somebody dies or passes away doesn’t mean that they leave your family’s story or leave your story.”

Lazy loaded image

Jack (Milo Ventimiglia) and Rebecca Pearson (Mandy Moore) with their young “Big Three” children earlier in the series: Mackenzie Hancsicsak as Kate, Parker Bates as Kevin and Lonnie Chavis as Randall.
Ron Batzdorff/NBC

Fogelman long had this ending in mind. But capturing the right snapshot in time with the young actors who play Kate, Kevin and Randall was key, as Lonnie Chavis, Mackenzie Hancsicsak and Parker Bates were 8 years old, and growing quickly, when the show began in 2016.

“We shot this [flashback in the] episode years ago, primarily to capture them in a moment in time when it would feel nostalgic to us and to the audience,” said Fogelman, during the panel, of filming the Pearson Saturday scenes at the start of the show’s third season, and before the actors would grow into the young teens they are now.

“It’s like watching an old home movie,” added Fogelman, which is fitting, as the Pearsons end up watching home videos in the flashback.

At another point in the day, Jack teaches his sons how to shave their faces while imparting words of wisdom that will go on to ring in Randall’s ears decades later — when, after burying his mother and also receiving the news that he is about to become a grandfather, he realizes the dichotomy of life and flashes back to seeing his father on that day. At the time, he didn’t quite understand why Jack was so satisfied to sit on their family sofa and watch his family enjoy a rather uneventful Saturday.

“When you’re young. You’re always trying to be older. And when you get old, always trying to go back. Be back,” explains Jack to young Randall and Kevin, insinuating that their sister was wise beyond her years and understands this concept better than they do. “You’re trying to appreciate the moments. That’s what we’re doing, is collecting these little moments. We don’t recognize them when we’re in them because we’re too busy looking forward. Then we spend the rest of our lives looking back, trying to remember. Trying to be back in time.”

Adding, “One day, you’ll get it.”

The flashback scenes make up more than half of the episode. Fogelman shot three or four days’ worth of material with the family of five, as well as another flashback scene between Randall and his biological father William (Ron Cephas Jones), who imparted his own fatherly wisdom to Randall about the joy and unconditional love of being a grandfather (to also capture Randall’s daughters, played by Eris Baker and Faithe Herman, before they aged). Both of these messages sit with Randall as he brings the series to a close. In the end, Randall, just like Jack did decades before him, sits and watches his family after Rebecca’s funeral, finding the joy amid sadness, and collecting new family memories.

“We knew going in that we wanted Rebecca to die in the second-to-last episode so that the final episode — while big and sprawling and gigantic and epic — the show wasn’t ending with a death,” said Fogelman, who has spoken about This Is Us being a tribute to his own mother, whom he did not have an opportunity to say goodbye to before she passed away. During the panel, he added, “The show was ending literally and structurally with what happens after somebody dies, which is very much what the theme of the whole show is: Somebody can pass away, somebody can die, but they don’t stop becoming part of the family’s storybook, past and future.”

That message was filtered through Jack in his finale words to Rebecca, when she finally meets up with her first husband on the mystical train before she passes. “It’s hard to explain, but you’ll do all those things with them,” he tells her, calming her fears of missing out on her family’s moments once she lets go. “You’ll be there.”

And the hopeful note was always what Fogelman wanted to leave behind.

“I’ve always found the show to be a little more hopeful and optimistic, and hopefully moving — in a positive way — than it was just sad and awful,” he told THR. “The theme of this episode and of the show has been that family carries on even after the loss of an important figure. I didn’t want the final story to be about the death, I wanted it to be about the family moving forward and reflecting backwards. So it was a very set plan from the very beginning, and I feel we executed it the right way.”

Kirsten Chuba contributed to this story.