A few years ago, the novelist Helen Phillips woke up in the middle of the night to the sound of her young daughter’s screams. She rushed to her bedside but was unable to calm her child, who was stuck in a nightmare, crying: “I want Mommy! I want Mommy!”

“It was one of the most terrifying moments of my life,” Phillips said. “It’s a metaphor for motherhood. There’s always going to be things that they’re confronting that you’re powerless against.”

That moment gave rise to one of the more unsettling scenes in her new book, “The Need,” a thriller that explores the psychological, emotional and physical torments of motherhood. The narrative centers on Molly, a sleep-deprived paleobotanist and mother of two young children, whose harried domestic routine is upended one night by an otherworldly intruder. The interloper represents Molly’s worst fear: that something bad will happen to her children.

For Phillips, 37, writing about a supernatural threat felt like the most accurate way to explore the treacherous emotional terrain of motherhood and the lurking feeling that even the most mundane situations are freighted with peril.