John Gregory Dunne, 71, the screenwriter and best-selling novelist who wrote about low and high life with a satiric and scathing pen, died Dec. 30 at his home in New York after a heart attack.

With him when he died was his wife, writer Joan Didion, whose book "Slouching Towards Bethlehem" made her a literary sensation in the 1960s.

Mr. Dunne, a younger brother of true-crime writer Dominick Dunne, emerged as an author with his own following with explorations of Hollywood greed ("The Studio," 1969), drifters in a squalid society ("Vegas," 1974) and Catholic guilt and corruption ("True Confessions," 1977).

He and Didion turned "True Confessions," a fictional story about a woman's murder and its effect on two brothers, a police officer and a priest, into a 1981 movie with Robert Duvall and Robert De Niro.

The couple also collaborated on screenplays for "Panic in Needle Park" (1971), which Mr. Dunne called "Romeo and Juliet on junk," and "A Star Is Born" (1976), the Barbra Streisand-Kris Kristofferson remake of the Hollywood classic.

Mr. Dunne was a frequent contributor to the New York Review of Books and used his experience in Hollywood to write with authority about film. His article about actress Natalie Wood is in the current edition.

Like John O'Hara, another acidic writer to whom he was often compared, Mr. Dunne was the son of a doctor. He grew up in privilege in Hartford, Conn. He began writing as a child to help overcome a stutter that terrified him every time he was called on in school. He was a keen listener, and reviewers later commended his skill with creating convincing dialogue and accents.

After graduation from Princeton University, he spent five years as a staff writer at Time magazine. He married Didion in 1964, and they moved to California, where they wrote the "Points West" column for the Saturday Evening Post.

He turned one column, about labor leader Cesar Chavez, into his first book, "Delano: The Story of the California Grape Strike" (1967). Critics noted his sophisticated grasp of the subject, immensely readable prose and compelling dialogue.

For "The Studio," he spent a year at Twentieth Century Fox and detailed with comic success how a studio makes movies. But afterward, he found he could not complete a similar book about Las Vegas and instead turned it into a novel, "Vegas: A Memoir of a Dark Season."

His most popular novel was "True Confessions," a murder story that evolves into a story of the Spellacy brothers, one a self-loathing detective and the other an ambitious man of the cloth. John B. Breslin, writing in The Washington Post, noted the book's "fascinating array of over- and underworld types."

Mr. Dunne's novel "Dutch Shea, Jr." (1982) was about an Irish American criminal lawyer's view of human misery. He said much of the book's depressing theme was colored by the suicide of his brother Stephen.

By this time, some critics were offering harsher analyses of his work. Adam Mars-Jones, in the Times Literary Supplement, wrote: "Even when there is no obvious occasion for revulsion, no severed nipple, no shredded baby, Dunne finds ways of letting the corruptible body know just what he thinks of it. . . . He is turning disgust into another cheap thrill, and fetishizing what he claims to denounce."

Mr. Dunne's work continued to critique Hollywood. In "Monster: Living Off the Big Screen" (1997), he showed how his work with Didion dramatizing the life of troubled television reporter Jessica Savitch became a tepid romance called "Up Close and Personal" (1996) with Robert Redford and Michelle Pfeiffer.

In addition to his wife and brother, survivors include a daughter, Quintana Roo.

John Gregory Dunne collaborated on screenplays with wife Joan Didion.