Like many crime writers, Ruth Ware makes a daily habit of scanning the news for stories that jump out at her—especially stories with “quirky” legal components. That’s where the seeds of her earlier novels, such as the New York Times bestseller The Woman in Cabin 10, were found, and that’s where she took inspiration for her latest thriller, The Turn of the Key.

“I was reading quite a lot about the new phenomenon of smart home abuse, or digital abuse,” Ware recalls, noting that the first case of prosecution for digital stalking in the United Kingdom took place in 2016. “Most of these cases haven’t been about ‘Big Brother’ or people spying from the other side of the world; they’ve been much closer to home. It’s people who want to control or terrorize another person in some way, and they’re using the tools that they have.”

In the case of Ware’s protagonist, Rowan Caine, the technology she finds herself surrounded by is incredibly sophisticated and deeply unsettling. When she first begins her position as a live-in nanny for the Elincourt family at a stunning estate in the Scottish Highlands, she doesn’t give much thought to the myriad functions of the smart home. Voice-activated window curtains and a shower that remembers the user’s ideal settings are surely excessive but convenient. The ability to look and listen in on her charges in their bedrooms seems invasive at first but also proves helpful. However, when strange things begin happening, an increasingly paranoid Rowan is unsure whether to attribute them to glitches with the software or something more sinister.

“I think a lot of good psychological thrillers rest on some level of paranoia,” Ware says, “and this book really takes a look at the difference between perception and reality.” At first, everyone thinks they’ve found the perfect solution: Rowan the perfect job, and the Elincourts the perfect nanny. “But of course, nothing is ever perfect. I really enjoy writing a scene where everything seems rosy, and then I keep applying pressure until cracks start to appear in that perfection.”

The Turn of the Key For Rowan, any illusions she may have maintained are ultimately shattered with the death of one of the children and her arrest for the murder. The novel, formulated as a letter to a potential defense lawyer, is fast-paced and equal parts gripping and disturbing in a way that surprised even its author. “I find it really difficult to scare myself,” Ware says, “because the essence of being scared is uncertainty. But there were a few times writing this book that I genuinely freaked myself out.” More than simply providing fodder for the fears of the reader (and writer), however, Ware uses the specifics of Rowan’s story to explore deeper and darker issues within society at large.

“We've all seen the huge double standards when women are accused of crimes to do with children,” Ware notes. “Women are always just vilified in the press.” With Rowan, Ware complicates matters for the reader by leaning into the gray space between falsehood and truth. The fact is, Rowan is indeed guilty of a crime, as she admits from the beginning—she’s just not guilty of murder.

“She has her own agenda,” Ware explains. “She's got secrets that she's keeping from everyone, and she doesn't always make great choices. I don't really care about writing likable characters. I like them to be interesting, and I like them to be realistic. Ultimately, I want them to be flawed,” Ware adds, “because we all are.”

James Feder is a New York–born, Scottish-educated writer based in Tel Aviv.