It took a decade and a multitude of puzzle pieces to fall into place for the director and actor to tell a tale about the most beloved children's entertainer of all time.

The story of how Tom Hanks came to play Fred Rogers, the most beloved children's entertainer of all time, begins, fittingly enough, at a child's birthday party.

In November 2015, director Marielle Heller was sipping lemonade in actor Colin Hanks' backyard, celebrating his daughter's birthday, when Colin's famous dad struck up a conversation. "He mentioned an article I was featured in," recalls Heller, referring to a New York Times Magazine story about female filmmakers. "But he didn't know I was featured in it."

The elder Hanks later sought out Heller's 2015 indie comedy The Diary of a Teenage Girl, starring Bel Powley and Kristen Wiig, and was so impressed that he arranged a meeting with her. The two became friends, and Hanks would email Heller as she worked on Can You Ever Forgive Me?, starring Melissa McCarthy. "He'd say, 'When are we going to find something to work on together?' "

That something presented itself in March 2017. Heller had just locked picture on Forgive Me? — a misanthropic buddy comedy about two self-destructive forgers — and was mulling what she'd do next. That's when producer Peter Saraf sent over the script for what would become A Beautiful Day in the Neighborhood.

Heller was familiar with the script by Micah Fitzerman-Blue and Noah Harpster, whom she had worked with while directing an episode of Amazon's Transparent. Her plan had been to make only films with female protagonists. "Mr. Rogers was the one man that could make me want to make a movie about men," she says. She signed on in summer 2017.

For Fitzerman-Blue and Harpster, it was a moment seven years in the making. In 2010, Harpster was struggling with his tantrum-happy 2-year-old daughter. "In a moment of desperation, I put on a clip of Fred Rogers," he recalls. "His slow, steady voice grabbed her attention in a way she had never done with me." Harpster called Fitzerman-Blue, saying: "Mr. Rogers is a warlock who speaks toddler, and I think we should write about him."

The pair scoured the internet and libraries for insights into the mysterious child-whisperer who had captivated generations. They soon encountered "Can You Say … Hero?," Esquire writer Tom Junod's November 1998 cover story on Rogers. The piece offered a perfect plot: a jaded, big-city journalist strikes up a meaningful relationship with Rogers while profiling him for a magazine.

But Fitzerman-Blue and Harpster had no rights — not to Rogers' life, nor to the magazine article. They wrote the script anyway. Assistants passed it around at agencies and studios and the screenplay landed on the Black List, the hottest unproduced scripts, in 2013.

"I had never read a script quite like it," recalls producer Youree Henley (The Lighthouse), who was certain that an established name would beat him to the punch. Henley and Big Beach producer Leah Holzer (Loving) persuaded the writers to let them take on the project.

But the Rogers estate would still have to sign off. Things did not start out promisingly with the gatekeeper to the Kingdom of Make-Believe, Bill Isler, former president and CEO of The Fred Rogers Co. "He said, 'You seem like nice guys, and I'm glad to hear anything you have to say,' " recalls Harpster. " 'But there will never, ever be a Fred Rogers movie.' " After the pitch, they slunk back from chilly Pittsburgh, where Rogers used to tape Mister Rogers' Neighborhood and where the children's programming company is located, to sunny Los Angeles, but refused to give up.

Eventually, they began to wear Isler down. "I think he responded to our intentions — that we weren't looking to glamorize Fred. We were just looking to tell a story about Fred changing the life of a person in his world," says Harpster, referring to Junod, named Lloyd Vogel in the movie. Rogers' widow, Joanne Rogers, agreed to meet with the pair and opened her husband's archives to them.

Among Rogers' effects, the writers found a box labeled "Tom Junod," filled with hundreds of letters that the two men exchanged. They wove a layer of emotional heft into the script with details from the letters. Pleased with the result, Joanne Rogers granted them the rights to Fred's likeness and legacy.

Impressed with the filmmakers and the script, Junod — who fully owned the rights to anything he wrote for Esquire — sold them the rights to his Fred Rogers profile in 2014.

The next question was, Who would step into the famous blue Sperry kicks? Hanks was the obvious choice, but had previously passed on the script three separate times. "I said, 'I have a bit of a relationship with Tom. I can try,' " recalls Heller. " 'I'm sure he'll say no again. But let's give it one last go.' "

Heller laid out her vision to Hanks. "I said I didn't see it as a biopic — that it was really a character piece. I said its message of kindness was important for the world right now. I explained why it had the potential to be weirder than ever before." The movie is framed within an imagined episode of Neighborhood, replete with hand puppets and elaborate miniature cityscapes. Hanks offered to give the script one more chance.

"Six years had passed since I last saw it," he says. "Based on the power of her enthusiasm for it, and the screenplay having gone through several permutations — I found the shooting script to be much more focused — I guess you could say it just seemed to be about something more this time around."

Hanks pledged to play Rogers if production started in 2018. The team already had waited nine years; now it was a matter of just one more to land the Mr. Rogers of their dreams.

The extra months gave Hanks the opportunity, as he puts it, "to do slow, rolling research." In that time, he saw Morgan Neville's documentary Won't You Be My Neighbor?, which pulled back the curtain on the entertainer. "There's an awful lot of books to read and an awful lot of stuff to watch," Hanks says. "I was able to begin the process of fitting into those cardigan sweaters."

With Hanks' involvement, Sony's TriStar Pictures put up the $25 million budget. The pairing of Hanks and Rogers became a feel-good media sensation — just the balm needed two years into the divisive Trump era.

It took Matthew Rhys several auditions before he landed the part of Vogel, who is sent to profile Rogers and gets into a fistfight with his alcoholic father. "They wanted to be sure I was caustic enough to play Lloyd," explains Rhys, an Emmy winner for The Americans. He says he had little trouble accessing Vogel's deep wells of rage: "I've lived my life with rejection, so that's no stranger to me."

Filming commenced in Pittsburgh — which played itself while standing in nicely for 1990s-era New York City — in September 2018, where scenery and props artists painstakingly re-created the Neighborhood set in the original WQED studio where the show had once taped. "It was incredibly fast," notes Hanks. "Three weeks of shooting in Pittsburgh just flew by. That's a testament to how much of an organized filmmaker Marielle was."

There's a moment of truly bravura filmmaking — one minute of silence, shot in a Chinese restaurant filled with familiar figures from Rogers' life, including Isler and Joanne Rogers. In it, Hanks stares down the barrel of a camera, asking Vogel to consider "all the people who have loved you into being."

"A minute is a really long time," says Hanks. "But it was in the screenplay. The day we were supposed to shoot it, I said to Mari, 'We're really going to do this?' And she just looked at me and said, 'Yes. Yes we are.' "

In September 2019, almost a decade after an episode of Mister Rogers' Neighborhood calmed Harpster's daughter, A Beautiful Day in the Neighborhood premiered at the Toronto film festival. It was Hanks' first viewing, and he was ecstatic to see that the full minute of silence had made it into the final cut.

"It works against every rule of cinema," he says. "But it's really quite profound."

This story first appeared in the Nov. 20 issue of The Hollywood Reporter magazine. To receive the magazine, click here to subscribe.