Tony Basgallop’s latest television venture is a tense family drama with a twist. In Apple TV Plus’ “Servant,” married couple Sean (Toby Kebbell) and Dorothy (Lauren Ambrose) experience a trauma with their newborn, but rather than deal with it head-on, they use a reborn doll (a realistic baby doll that they treat like a living, breathing baby). They go so far as to hire a nanny — the religious Leanne (Nell Tiger Free) — but after her arrival things change drastically within their household.

What was the inspiration behind “Servant”?

It’s been something I’ve been writing for a very long time — since I’ve had children, really, which is 17 years ago. I wanted to write about the changes that children bring into your life and the fears they bring and how the slightest thing that goes wrong can affect you — just disaster scenarios. That was the initial idea. Over the years I’ve been developing these characters and trying to tell a story that’s very contained. I’ve thrown away a lot of the rules I’ve learned about writing in television for this one; I’ve very consciously tried to make it personal and yet keep it genre-specific — play it as a thriller.

Losing a baby is definitely a disaster scenario, but the use of a reborn doll is very psychologically specific. How much research into that device did you need to do?

I’ve known about reborn dolls for several years. I don’t know anyone who’s gone through this process, but it’s not so much that I’m trying to tell a true story of someone who’s actually gone through this event. I can see how somebody could attach to an inanimate object and feel it’s real. If you attach all of your hopes and all of your needs into this one inanimate object, then it becomes a focal point. It didn’t feel like there needed to be too much research because the way the characters go about it, they themselves didn’t research it — there’s no psychiatrist involved; everyone is reacting in the moment, trying to find a solution to an impossible problem. They can’t face the truth about what’s happened so they reach out for the nearest thing that feels like it might work, and it’s one of those lies that just keeps building and building.

How deep do you dive into themes of the supernatural, or otherwise unnatural?

No one ever levitates anything off a table, but there are things that are unexplainable. The whole point of it is to be able to tell a story that can be read in two ways, which is probably one of the reasons it’s taken me so long to get the structure of the show right. Because every time something happens in the show that is seemingly unexplainable, the point is that the characters look for the explanation behind the unexplainable — and they find it. One of the ways we pitched the show is, “Is this a miracle or is it a crime?” And it often depends on your personal belief system. If your mind is open to incredible miracles, then you can watch the show and enjoy it on one level. And if you look for explanations — if you refuse to accept the divine or miraculous events — then you can always find the logic behind something.

How important did you feel it was to balance characters who fell on both sides of that belief system?

I was creating characters that are from a very privileged world. I wanted to tell a story where we present this seemingly perfect family. If you’re on the outside looking in they have everything: They have this perfect family, this perfect house, these incredibly successful careers; they have this beautiful newborn baby. And you feel like nothing could possibly go wrong. But when we enter through the character of Leanne, the nanny who comes to work in the house, as soon as she goes behind the closed doors, she realizes that actually everything is broken within this family — everything has fallen apart and it’s simply a facade they’re presenting. With Leanne stepping in, is she there to fix everything or exploit everything? From Sean’s perspective, he is someone who is looking at the rational arguments of everything. When we come into the show, he’s presented with what on the face of it could be a miracle but then again could be a crime — an exploitation. And he’s a character who goes on a journey of not trusting and not believing anything he’s seeing, but by the end of the first season his mind has been opened to another reality, another possibility, something that he’s never thought of before. So, in a sense, it’s very much his journey into religious acceptance.

What was the collaboration like with executive producer/director M. Night Shyamalan?

When Night and I first met, I had two episodes already written and he reacted very strongly to those. He became a great sounding board. Pretty much with every episode, I dive in, I write what I believe in, I take the story where I think the next step is, and then he and I sit down to discuss that script — that step — looking to what we’re delivering. He and I have a similar sensibility in we’re contrarians, in a sense; we both want to deliver what people aren’t expecting. But that doesn’t always mean a big plot twist; it can just mean [not to] go down the usual path or scare people where they want to be scared. We put them on edge and then throw something in that’s going to knock them off-balance.

How did you approach the inclusion of narrative twists in the storytelling over the course of the season?

It never felt like there needed to be twists or supernatural elements coming in. It always felt like a natural progression. It’s the stranger in the nest type of story. There’s someone living upstairs and we don’t know who they are, what they’ve done, what their motivation is. And we’re seeing it differently. Dorothy sees this nanny as a godsend — somebody who’s allowing her to continue her career and somebody who’s perfect in every way for her — whereas Sean is seeing an intruder who is manipulating their environment and is a threat to his wife and the stability of the lie he’s created. By the time you reach the end of Episode 1, the tension between these characters and how everyone wants a different outcome is what drives us forward.

What was the most challenging part of this story to crack?

When Night and I took the show out to pitch, there was a very definite moment of revelation in the show. Because we’re writing about a family that has experienced a tragedy but is avoiding dealing with that tragedy, there was always going to be the moment in which we had to tell the audience how that tragedy occurred. It was a conversation Night and I had. I knew what the tragedy was, and he had a pitch on how it occurred, and I had a pitch on what happened after it occurred. So we went into it knowing that was very much Episode 9, the second episode that Night directed, and we knew we had to get to that point, so the challenge was, how much can we tell and what can we do with the audience up to the point where we tell them what’s in the past? The danger’s always in when you get to that point if they’re going to be disappointed or if it is going to be something that helps tell the next chapter in the story. For me as a writer, knowing I had to hit that mark at a certain point was always the challenge. But when we got there, it ended up being the easiest episode to write because with everything we had set up in the first eight episodes, as soon as I was writing nine, I was confident this was it and the audience would want to find out the secret the characters are hiding from each other — not just what we’re not telling the audience but what Dorothy as a character has repressed and what Leanne as a charater did not know before she came into this story, and it’s what Sean and Julian [Rupert Grint] as characters desperately have to protect. It was a big turning point we always had to build towards.