Alvin Sargent, a Hollywood screenwriter who specialized in haunting explorations of characters’ insecurities and imperfections, and who won Academy Awards for “Julia” and “Ordinary People” before enchanting a younger generation of viewers with his work on Sony’s Spider-Man film franchise, died May 9 at his home in Seattle. He was 92.

His agent David Gersh confirmed the death but said he did not know the cause.

Mr. Sargent worked as a television writer before turning to Hollywood filmmaking in the mid-1960s, embarking on a career that veered from Westerns to romantic comedies to coming-of-age movies, with a focus on characters undergoing radical transformations — whether as the result of family tragedy or a genetically engineered arachnid.

“You just can’t get through life happily without experiencing some degree of love and pain,” Mr. Sargent once said, according to Donald Chase’s book “Filmmaking: The Collaborative Art.” “That theme is something I could deal with forever.”

Typically drawing from plays or novels, Mr. Sargent wrote more than two-dozen screenplays, painstakingly stitching together scenes as they came to him, rather than using an intricate outline or following the source material page by page.

He worked on movies including “The Effect of Gamma Rays on Man-in-the-Moon Marigolds” (1972), based on the Pulitzer Prize-winning play by Paul Zindel; “Straight Time” (1978), starring Dustin Hoffman as a prisoner who is released on parole but returns to a life of crime; and “What About Bob?” (1991), with Bill Murray as a neurotic patient who follows his psychiatrist, played by Richard Dreyfuss, on a family vacation to New Hampshire.

Mr. Sargent was nominated for three Academy Awards, beginning with the 1973 comedy “Paper Moon,” adapted from the novel “Addie Pray” by Joe David Brown. Directed by Peter Bogdanovich, the film starred Ryan O’Neal as a Depression-era swindler, with Tatum O’Neal — Ryan’s daughter — as his accomplice. She went on to win the Academy Award for best supporting actress, becoming the youngest competitive winner in Oscars history at age 10.

Notable deaths in 2019: Elijah Cummings, Cokie Roberts, Toni Morrison and others we have lost this year

Don Imus | Don Imus, who spent more than half a century in radio and television skating along the edge of propriety and occasionally falling into the abyss of the unacceptable, died Dec. 27 at a hospital in College Station, Tex. He was 79. In a roller-coaster career in which he grew chummy with prominent politicians, repeatedly got suspended or fired for offensive cracks, abused drugs and touted health foods, Mr. Imus won a loyal following, made millions and transformed himself from a bad-boy DJ into a host whose program became a nearly mandatory stop for presidential candidates. Read the obituary (Richard Drew/AP)

Mr. Sargent wrote two episodes of a short-lived television series adapted from the film, and won his first Academy Award for “Julia” (1977), drawn from the memoir of playwright Lillian Hellman. Told through flashbacks, the film centered on the friendship between Hellman (Jane Fonda) and her childhood friend Julia (Vanessa Redgrave), who enlisted the author’s help in supporting an anti-Nazi group in World War II-era Germany.

To most critics, Mr. Sargent’s greatest triumph was “Ordinary People” (1980), adapted from the best-selling novel by Judith Guest. The film marked actor Robert Redford’s directorial debut, and chronicled the daily lives of the suburban Jarrett family — played by Donald Sutherland, Mary Tyler Moore and a young Timothy Hutton — more than a year after their eldest son’s death in a boating accident.

“The Jarretts become important people without losing their ordinariness, without being patronized or satirized,” wrote New York Times reviewer Vincent Canby. “ ‘Ordinary People,’ ” he added, “is a moving, intelligent and funny film about disasters that are commonplace to everyone except the people who experience them.”

The movie won four Academy Awards, including best picture and best adapted screenplay for Mr. Sargent, whose dialogue dissected the family’s emotional trauma and loneliness. When Hutton’s character visits a psychiatrist, he recalls his mother’s anger that he bled on the bathroom rug during a suicide attempt.

“She had to pitch it out,” he says. “They even had to regrout the tile floor.”

Mr. Sargent was a teenager when his father, a hay-and-grain salesman, died by suicide. He often returned to familial themes, including in “Anywhere But Here” (1999), which starred Susan Sarandon and Natalie Portman as an eccentric mother and daughter in Beverly Hills, Calif.

“Thank God for dysfunctional families,” Mr. Sargent told the Los Angeles Times before the film’s release. “They’re God’s gift to writers. Émile Zola said, show me a family with a mother, father and two children and I’ll show you a whole library full of books.”

Alvin Supowitz was born in Philadelphia on April 12, 1927. Like his older brother, Herb Sargent, a television comedy writer who helped create the “Weekend Update” segment on “Saturday Night Live,” he changed his surname to help launch his writing career. “It’s an easier name to sell in Hollywood,” the younger Sargent once told the New York Times.

Mr. Sargent dropped out of high school in Upper Darby Township, Pa., to join the Navy during World War II. He learned to type, taking down morse-code messages, and later told the Writers Guild Foundation that as a young man his “one passion was typing, not writing.”

It was only to practice his typing skills that he began writing dialogue. He moved to Los Angeles after the war and worked as a waiter, deliveryman and ad salesman for Variety newspaper, launching a brief acting career with an uncredited appearance in “From Here to Eternity” (1953).

Beginning in the late 1950s, Mr. Sargent wrote for television series, including “The Alfred Hitchcock Hour,” “Naked City,” “Empire” and “Route 66.” His first screenplay was “Gambit” (1966), a spy spoof he and Jack Davies adapted from a short story by Sidney Carroll.

Mr. Sargent’s other movies included “The Stalking Moon” (1968), a Gregory Peck Western; “The Sterile Cuckoo” (1969), starring Liza Minnelli as a manic college freshman; “Bobby Deerfield” (1977), a racecar romance with Al Pacino; and “White Palace” (1990), a love story featuring Sarandon and James Spader. He also wrote the original screenplay for “Love and Pain and the Whole Damn Thing” (1973), a romantic comedy directed by Alan J. Pakula.

Mr. Sargent had never written a comic-book story when producer Laura Ziskin, his longtime companion, reportedly asked him to do a rewrite of “Spider-Man” (2002). He said he saw “mythic” qualities to its story of a lonely, guilt-ridden teenager, and became a creative pillar of the franchise, which helped spur a wave of superhero movies after it grossed more than $800 million at the box office.

Although Mr. Sargent was uncredited in the first film, he co-wrote its two sequels and a 2012 reboot. He was notably the lead screenwriter for “Spider-Man 2,” which film critic Roger Ebert described as “the best superhero movie since the modern genre was launched with ‘Superman’ (1978).”

Mr. Sargent’s marriage to Joan Camden, a television actress, ended in divorce. In 2010, he married Ziskin, who died of breast cancer the next year. Survivors include two daughters from his marriage to Camden, Amanda Sargent and Jennifer Sargent; and a stepdaughter, Julia Barry.

Although he remained productive for more than four decades, Mr. Sargent often spoke of the struggles he faced as a writer, both in polishing his screenplays and in finding studio backers to bring them to life. “When I die,” he sometimes quipped, “I’m going to have written on my tombstone: ‘Finally, a plot.’ ”