There’s something self-defeating about a reader’s attempt to solve a mystery: she’s trying to crack a code, and yet if she does, the fun is over. Years ago, I solved the puzzle midway through Josephine Tey’s “Brat Farrar,” and once I finished patting myself on the back, I was stuck slogging suspenselessly through the rest of the book. Readers want something from a mystery novel that we generally don’t want from life: to be foiled. Megan Miranda’s “The Last House Guest” offers precisely this counterintuitive satisfaction: the pleasure of being outsmarted.

Cover courtesy of Simon & Schuster

As “The Last House Guest” begins, it’s the summer of 2017 and the night of the annual end-of-season bash in the fictional seaside town of Littleport, Maine. Narrator Avery Greer has helped set up the party, held at the Blue Robin, one of the rental properties that she’s been managing for the past six summers for the wealthy Loman family, who live in Connecticut during the offseason.

For Avery, the best thing about the Lomans is Sadie Loman, her closest friend since the summer they met in Littleport as teenagers. Avery’s parents died in a car crash when she was 14, and a few years later she was raising some serious hell around town. Sadie took her on as a kind of rescue project: she convinced her parents to spring for business classes for her friend, and Avery has been in their employ ever since.

Sadie is supposed to attend the party at the Blue Robin but doesn’t show, which is worrisome to Avery, who tries unsuccessfully to contact her. When two police officers arrive at the house, they ask to see Sadie’s brother, Parker. The officers report that Sadie has been found dead on Breaker Beach. While the official cause of Sadie’s death is drowning, the following day the police find something of interest in the kitchen trash at the Lomans’ summer house. “I never knew what Sadie’s suicide note said,” Avery reflects later. “I knew only that it existed, and that it closed the case…”

“The Last House Guest” seesaws between the summer of Sadie’s death and the summer that follows, as Avery, who continues to work for Loman Properties and live year-round in the family’s guesthouse, tries to come to terms with her friend’s unaccountable demise. One morning, Avery gets a phone call from a renter informing her that someone has been poking around inside the house that he’s staying in — the Blue Robin, as it happens. While Avery is inspecting the property following the ransacking, she discovers something of Sadie’s in a blanket chest: “Somehow her phone had ended up at the rental house across town while her body was washing up on the shore of Breaker Beach.”

Miranda, the author of the New York Times best seller “All the Missing Girls” and scads of other thrillers, could have packed it in after creating a topflight puzzle, but “The Last House Guest” doubles as a meditation on belonging. Avery should by rights feel at home in Littleport — she’s both a native and a full-time resident— and yet she’s forever on the periphery, permanently marked by her kinlessness and adolescent missteps. When Avery first met Sadie’s parents, she was certain that the Lomans saw her as “something Sadie had found on the beach and would hopefully get over just as quickly.” But Sadie didn’t get over Avery, and Avery isn’t getting over Sadie or the question of why she died.

Given all that she’s been through, you can’t expect Avery to do all the puzzle solving. That’s your job too. Oh, and good luck with that.

Nell Beram is a former Atlantic Monthly staff editor and coauthor of “Yoko Ono: Collector of Skies.” Her work has recently appeared in Bright Lights Film Journal, Shelf Awareness and the blog Little Old Lady Comedy.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.