John Cheever and wife Mary in the garden at their Ossining, N.Y., home in 1979. (Paul Hosefros/The New York Times)

Mary Cheever, an author and poet best known as the enduring spouse and widow of John Cheever, has died, surviving by decades a husband who used their lonely but lasting marriage as an inspiration for some of his most memorable stories. She was 95.

She had pneumonia and died April 7 at her colonial-style manor in suburban Ossining, N.Y., said her daughter, Susan Cheever.

The home served as a well-publicized backdrop to John Cheever’s facade as the gentleman scribe of such acclaimed short stories as “The Swimmer” and “The Five-Forty-Eight.” Time magazine wrote in 1964, “John Cheever, almost alone in the field of modern fiction, is one who celebrates the glories and delights of monogamy.”

But as numerous books about the author later revealed, John Cheever was the least contented of men, an alcoholic who carried on desperate affairs with men and women, including the actress Hope Lange.

Yet the Cheevers remained married, long after they stopped sleeping in the same bed or speaking on a daily basis. She nursed him through his cancer and was at his bedside when he died in 1982, several years after he won the Pulitzer Prize for his collected short stories.

“What’s important is what he wrote, not what he did,” she would later say of her marriage.

Mrs. Cheever was a teacher, fiction editor of Westchester Magazine, author of “The Changing Landscape: A History of Briarcliff Manor-Scarborough” and writer of “The Need for Chocolate and Other Poems,” which included the poem “Gorgon” and its note of “life-denying husbandry.”

John Cheever would declare, with uncertain sincerity, that “The Need for Chocolate” was a “triumph for her as a poet, a neighbor, a mother, wife.”

In the 1991 memoir “Treetops,” Susan Cheever described her mother as “a talented poet, artist and writer” but also “one of a lost generation of women, women who were isolated between the historic ­changes of the Depression and World War II and the frantic pace of our society’s changing values in the last thirty years.”

Mary Winternitz was born in New Haven, Conn., on May 4, 1918. Her father, Milton Winternitz, was the dean of the Yale School of Medicine. Her mother, Helen Watson, was the daughter of Thomas Watson, to whom Alexander Graham Bell called out during the first telephone conversation.

Mrs. Cheever would remember an isolated childhood — her parents often away, her siblings older and at boarding school.

“I was very much alone and got in the habit of being alone, and I like being alone,” she recalled in Blake Bailey’s prize-winning 2009 biography of John Cheever, “Cheever: A Life.”

A graduate of Sarah Lawrence College in Bronxville, N.Y., the dark-eyed Mary was artistic and attractive, and John Cheever was immediately taken when they met in 1939 at a Fifth Avenue office building. He soon moved in with her, and they married in 1941; the then-struggling author promising his bride, in a letter shortly before their wedding, a “wonderful and beautiful life.”

Following the settings of John Cheever’s stories, they lived on the Upper East Side of Manhattan and then moved to the suburbs in the 1950s, when the author devised his imaginary Shady Hill. They had three children, two of whom — Susan and Benjamin — became writers. The third, Federico, is a lawyer who teaches at the University of Denver law school.

John Cheever was celebrated for writing about domestic life, but his characters more often found joy in escape. Many stories were based on his family, less than happily. In “The Season of Divorce,” he tells of a talented, bored housewife who misses her former life of the mind. The husband in “The Ocean” believes his wife mad, possibly murderous, and slips off to the English countryside, where he falls “into a sweet sleep.”

Bailey would describe the wife in “The Ocean” as perhaps John Cheever’s “most cruelly deliberate caricature of Mary Cheever.” She later remarked that she feared arguing with her husband, because her words would end up in his fiction.

After his death, she approved — to some criticism — the publication of his highly personal and explicit journals. She also was involved with a nasty legal struggle between the Cheevers and the publisher Academy Chicago.

Mrs. Cheever had signed a contract in 1987 for the release of some uncollected stories by her late husband, only to change her mind after Academy Chicago asked to include a wide range of material, including some juvenilia. The Cheevers and the publisher fought for years, before 12 judges in New York and Chicago, until the contract was invalidated and a smaller collection released.

— Associated Press