Writer-producer Stanley Rubin, whose wide range of credits included classic film noir “The Narrow Margin,” Marilyn Monroe-Robert Mitchum Western “River of No Return,” TV series “The Ghost and Mrs. Muir” and Clint Eastwood’s 1990 feature “White Hunter Black Heart,” died Sunday at his home above the Sunset Strip. He was 96.

Rubin was also a leader at the Writers Guild and Producers Guild. He negotiated contracts for the former and served the latter as president for five years.

Rubin wrote 19 feature films and produced more than 25 in a career that spanned seven decades. But frustration with the film business also led him to television in that medium’s early stages — “The idea of getting into something on the ground floor — not just as a writer but perhaps as a producer — excited me with visions of control and ownership,” Rubin wrote in an essay much later.

He won an Emmy in 1949, at the first Primetime Emmy Awards, for an episode of an anthology series he co-created, “Your Show Time.” (He later received Emmy nominations for “The Ghost and Mrs. Muir” and for the 1976 special “Babe.”)

He started in the Paramount mailroom and later worked at Universal, Columbia, NBC, CBS, Fox and MGM.

His other film credits as a writer or producer included Francis the Talking Mule entry “Francis in the Navy”; “The Girl Most Likely,” with Jane Powell and Cliff Robertson; “Promise Her Anything,” with Warren Beatty and Leslie Caron; “The President’s Analyst,” with James Coburn; and 1990’s “Revenge,” with Kevin Costner.

Rubin also produced TV movies including 1979’s “…And Your Name Is Jonah” and 1981’s “Don’t Look Back: The Story of Leroy ‘Satchel’ Paige.”

Stanley Creamer Rubin was born in the Bronx and studied at UCLA in the 1930s, dropping out with almost enough credits to graduate — only to return many decades later, earn those final credits and graduate in 2006. During WWII, Rubin served with the Army’s First Motion Picture Unit.

He is survived by his wife of 59 years, actress Kathleen Hughes; daughter Angie, a film music editor; and sons John, a maker of documentaries, and Michael, who formerly worked in post-production. A third son, Chris, died in 2008.