Tessa Hadley is a wonderful writer, but you’ve probably never heard of her. A keen observer of human relationships, her unique genius lies in the elegance and accuracy with which she captures the emotion, the passing, vague perception or small epiphany. The British author of seven novels and several story collections, she has had some success with her books, but her accomplishments were hardly inevitable conclusions. Her first novel, “Accidents in the Home,” wasn’t published until she was 46, almost geriatric compared with those writing wizards who land contracts at the Iowa Writers’ Workshop and graduate into a field of praise.

I was introduced to Hadley when I read the marvelous “The Past” (2016), about four adult siblings enjoying their last vacation in a summer cottage. It focuses on the passing of a treasured era, a melancholy transition that everyone knows will reshape their relations to each other.

Hadley’s most recent book, “Late in the Day” (Harper), also deals with a complicated quartet of friends and lovers. Exquisitely written, and covering more than 30 years, the story focuses on a similar but more serious moment of change that arrives like a bolt of lightning. The plot involves two married couples who have known each other since their university days. Christine is a painter married to Alex, whose family emigrated to England from Czechoslovakia in 1968, when he was 9. His father was a writer, famous in his country, and an adulterer whom Alex despised. Alex himself once wanted to be a writer and produced a book of poems —but that was it. He became a teacher of poetry, instead, a calling he found surprisingly agreeable. Lydia has no profession, but is beautiful and effervescent, with an “arty, sexy, theatrical look.” She is married to Zachary, a wealthy, charismatic London gallery owner, and Alex’s good friend. For decades, the lives of the two couples continued on a tight smooth path, with the extroverted, generous Zachary — “a striding cheerful giant with torrents of energy” — providing energy and enthusiasm, and Alex, somber and reflective. Each couple has a daughter away at school.

As for the women, they consider themselves feminists, “yet both had chosen patterns of relationship with men which looked almost like their mothers’ marriages, dependent and sheltered; they lived their secret lives inside the strong shell of their husbands’ worldliness and competence.”

The story opens sadly when Lydia calls from the hospital with news that Zachary has had a heart attack. Christine listens in shock for several minutes before asking, “Are they going to operate?” “I told you,” Lydia says, “he’s dead.” It’s a moment expertly constructed to capture the confusion of life-altering news, those times when the roof blows off our well-ordered lives and we run to close a window. “He wasn’t the dying type,” Lydia objects. “Of all of us,” Christine thinks, “he’s the one we couldn’t afford to lose.” In the immediate aftermath of his death, the families band together: Alex goes to collect Lydia, who’s alone for the first time in years and terrified by her own incompetence. Zachary’s friends are disoriented by having the smooth structure of their quartet torn asunder. “There was something intolerable in the expectation in that room, strained around Zachary’s absence, which could not be filled,” the author writes. “The time when they might have been waiting for him to walk through the door was so recent, so close at hand, that it seemed vividly possible; they could imagine how he’d make his entrance, noisy with reassurances, full of jokes, puzzled by their glum faces. He was always so up to date on everything, so full of news. It seemed impossible he didn’t know this latest fact, his own death.”

“Late in the Day” moves forward and backward in alternating chapters with different points of view. The earliest sections show Christine and Lydia as students, respectively cautious and reckless, in their pursuit of Alex and Zachary. Hadley details the lives and romances the four of them will construct over the next decades. It’s easy to forget the cracks in those foundations, but when Zachary dies, they will find that the familiarity of a long friendship equips them to help — and devastate — each other.

In the novel’s current-day sections, we watch Zachary’s widow, and his surviving friends, struggle to readjust their world without him. Moments of sympathy and understanding are combined with acts of callousness that shock even the perpetrators. It’s nothing unusual, really, just the everyday calamities and betrayals of domestic life but, depicted by Hadley’s prose, they are turned into something extraordinary.

Her husband’s death leaves Lydia devastated by grief and, completely clueless about how the world works; she is appalled at the idea of living alone. Egotistical and needy, she moves in with Christine and Alex and it’s not possible to write about this novel without revealing the result of this, but it comes as no huge surprise. Alex and Lydia wind up in bed and when Christine finds out everything goes downhill. “What had happened?” Alex wonders. “This new reality seemed like a trick of the darkness: momentous but so accidental.” He regrets hurting his wife, but he’s excited about something new: “Something cruel and cold had come to the surface in his life, appalling and exhilarating.” Alex also finds that he may be “like his father.”

Christine is, of course, mortified by this double betrayal. She reflects on the incidental way she ended up married to Alex, through “the accident of his choosing her.” What had the last 30 years meant then? Would “their whole history be merely the gaudy backdrop to a new normality?” Finding the answer to all that is what, in essence, the book is about.

Hadley understands the desires and humiliations of middle age, and she’s just as perceptive when it comes to the longings of young people. They lurk around the edges of this story, both sympathetic and mortified, certain with the righteousness of youth that they’ll never behave so idiotically as their aimless, aging parents.

Despite its grim opening, this is a book about the endurance of life, and the painful but clarifying effect of great loss. There is hope for the wonderfully imperfect characters and, as Hadley suggests, even late in the day, there’s still time to begin again.