After five seasons, Dr. Max Goodwin's tenure at New Amsterdam has come to an end.
The NBC medical drama—which aired its series finale on Jan. 17—concluded with a tear-jerking twist after Ryan Eggold's Max left his position as medical director to work at the World Health Organization in Geneva.
The episode sporadically introduced Max's unnamed replacement leading up to his last day in the hospital, but it wasn't until the final scene that it was revealed that the woman taking over his position was actually his now-adult daughter, Luna, in the future. Now, New Amsterdam executive producers David Schulner and Peter Horton are breaking down the final episode and revealing the surprising source of inspiration for the climactic ending.
"My 11-year-old daughter [Ella] came up with the finale of Luna being the medical director," Schulner exclusively told E! News during a joint interview with Horton. "I was like, 'Okay 11-year-old daughter, you eat your Cheerios and I'll do the writing, thank you very much.' Then Laura Valdivia—one of our writers—said, 'Am I crazy, but I think Luna should be the medical director at the end?'"
After a second writer pitched the idea, he continued, "I was like, 'I guess this is our ending, because literally the universe has planted it in everyone's minds.'"
Schulner and Horton revealed that while they had no other endings in mind for the series, they were certain that they wanted to tell each main character's backstory—and the reason they went into medical care—when they crafted the final script.
"Once we knew that essentially we were telling Luna's origin story on the day she was inspired to be a doctor, we thought wouldn't it be great to tell everyone's origin story," Schulner explained, "because the thing we wanted the finale to honor was the actors we loved and the characters they created."
And while the cast and crew said goodbye with a formal wrap party, Schulner revealed the final day of filming was actually "so anticlimactic" for a very funny reason.
"The final scene was young Max being asked 'how can I help?' by that doctor, and that's how we ended the show," Schulner said. "How beautifully romantic, but none of our actors were there. Those were day players in a flashback."
"We didn't think that by the time we got to that scene all of our actors would be wrapped and on their way to their new lives," Horton added. "We did a little speech at the end for whoever was left over and people were standing around looking at us like 'can we go home?'"
Binge New Amsterdam any time on Peacock.
(E!, NBC and Peacock are all part of the NBCUniversal family)