By Ruth Kinane
August 30, 2018 at 06:24 PM EDT

When The Little Stranger star Domhnall Gleeson first received the script for the gothic thriller, it wasn’t for the principal role.

“Originally, Lenny [Abrahamson, of Room] sent me the script to play a different character, and I said, ‘I’ll do anything you want me to do in any project, but would you mind considering me for the character Faraday?’” Gleeson, who previously worked with the director on 2014’s Frank, tells EW. “There’s such a change in him over the course of the film, and it’s so dark and unlike anything I’ve ever played before.”

Nicole Dove/Focus Features

Yes, Dr. Faraday is more than a little bit of an oddball. Adapted by Lucinda Coxon from Sarah Waters’ novel and set during the summer of 1948, the story tells of the (initially) good doctor’s visits to Hundreds Hall — the two-century-old, once prestigious, now dilapidated home of the Ayres family. But creaking floorboards and incessant dust are far from the Ayres’ biggest problem. “People talk about it like it’s the weird Downton Abbey cousins down the road, who they don’t talk to anymore because they started falling apart,” Gleeson jokes.

As Faraday spends more time with the family, he begins to realize the past haunts them, perhaps literally. It’s not long before the doctor, eager to shake off his working-class beginnings, becomes entwined in the once-aristocratic family’s life and home, starting a romantic dalliance with daughter Caroline (played by The Affair’s Ruth Wilson) and inserting himself into the house’s daily goings-on — unnerving and otherwise.

Nicole Dove/Focus Features

“He’s got a lot of anger and bitterness bottled up, and yet he’s a good man,” explains Gleeson. “Lenny gave me this phrase early on, and I wrote it on the front of my script: ‘If you’re carrying something explosive, you walk carefully.’ He’s maneuvering himself through his life carefully because he’s aware that there’s something inside of him. As it goes on, you begin to feel the house is sick, the people are sick. As the doctor, he tries to cure them, and then he gets sick himself. You ask, ‘Where is this all coming from?’”

Where this is all coming from forms the mystery at the center of the story. Caroline and her brother, Roderick (Will Poulter), lost a young sister, Suki, and their mother (Charlotte Rampling) a daughter. While Mrs. Ayres still mourns and clings to the memory of Suki, Faraday’s grief is directed at the loss of the ruling-class’ position and the general demise of that social hierarchy, despite never being part of it himself.

“He wants something that he can’t have,” says Gleeson. “He wants to be of the house, he wants to be of those people, he wants to be thought of as their level of society. But even with all the money in the world, he would never be thought of at their level. He will always be from a working-class background. He will also be new money, the help. He just burns with shame of it all, and you don’t get rid of that. You carry that for the rest of your life. It’s like a disease that eats away at you as you realize that you’ll never get what you want.”

For a moment, it seems that a relationship with Caroline will be his permanent ticket into the house, but she, disillusioned with how her once-promising future is panning out, sees Faraday as a way out of her stale existence at Hundred Halls. “What they find in each other feels destined to fail,” says Gleeson. “The back-and-forth on whether that relationship is good for them is endlessly interesting. Ruth did such a beautiful job. We used to laugh about Caroline between takes. She would be like, ‘Jesus Christ, why would she do that?’ And then she found herself making her worse during the scene: a little bit more snooty or a little bit more desperate or a little bit more sexual. Working with her was wonderful.”

As Faraday and Caroline struggle to agree on their relationship status, strange and violent incidents start occurring in the stately home, caused by the lingering anger of young Suki — or something else completely. “You don’t know who is behind what is happening,” Gleeson says. “You don’t know who’s to blame for the deterioration of these people’s minds as the film progresses. Are they doing it to themselves? Is he to blame? Is she to blame? Is the maid to blame? The energy in the house starts feeding Faraday, and Faraday starts feeding the energy. Things start happening that amount to giving him what he wants, or what he thinks he wants, but ultimately none of them can get out of the house. They’re all stuck.”

The Little Stranger’s potentially paranormal activity aside, does its star believe in such things? “People always ask me if I believe in ghosts and all that sort of stuff, because that’s the center of the story — this child who died who may be haunting them,” he says. “I’ve never believed in ghosts, but I’ve been terrified in the middle of the night sometimes and I don’t know why. And I think that’s scarier: Your mind only gives you things that are useful.”

The Little Stranger starts haunting theaters Aug. 31.