Fay Kanin, an Oscar-nominated screenwriter for the 1958 Clark Gable-Doris Day comedy “Teacher’s Pet” and former president of the Academy of Motion Picture Arts and Sciences, died March 27 at her home in Santa Monica, Calif. She was 95.

Her caretaker, Monique West, confirmed the death but did not disclose the cause.

In a writing career that spanned more than four decades, Mrs. Kanin penned screenplays for such movies as the 1954 Elizabeth Taylor romantic drama “Rhapsody” and television specials such as “Tell Me Where It Hurts,” for which she won two Emmy Awards in 1974. She won another Emmy in 1979 for producing “Friendly Fire,” a critically acclaimed Carol Burnett TV movie based on the true story of an American soldier killed in the Vietnam War.

Mrs. Kanin served as president of the Academy of Motion Picture Arts and Sciences from 1979 to 1983. She was its second female president, after actress Bette Davis. Mrs. Kanin also was a longtime chairwoman of the National Film Preservation Board of the Library of Congress and served on the board of the American Film Institute.

The Academy said in a statement that Mrs. Kanin was instrumental in expanding the organization’s public programming and was committed to its preservation work.

Fay Kanin poses for a photo during the foreign language film award reception at the Academy of Motion Picture Arts and Sciences on March 3, 2006, in Beverly Hills, Calif. (Danny Moloshok/Associated Press)

In the late 1940s and early 1950s, she and husband Michael Kanin were placed on a “gray list” — a less formal and less severe version of the anti-communist Hollywood blacklist. The Kanins, who were friends with Communist Party members, were denied work for about two years in the early 1950s until director Charles Vidor asked them to write “Rhapsody.”

Mrs. Kanin often collaborated on scripts with her husband, who shared the Oscar for best original screenplay with Ring Lardner Jr. in 1942 for “Woman of the Year.” The Kanins shared the best original screenplay Oscar nomination for “Teacher’s Pet,” which centers on an ornery newspaper editor, played by Gable, who falls for an idealistic journalism instructor, played by Day.

Mrs. Kanin told the Los Angeles Times in a 2001 interview that “Teacher’s Pet” was originally written as a serious film but she and her husband found no takers for the script. Rewritten by the couple as a comedy, the project sold to Paramount Pictures.

Fay Mitchell was born May 9, 1917, in New York and grew up in Elmira, N.Y., and in Los Angeles.

After graduating from the University of Southern California, she pursued a Hollywood career with the help of an uncle who had contacts in show business. She got a job as a reader in RKO studio’s story department.

While there, she met her future husband, then a writer in the company’s B-movie unit. The Kanins married in 1940 and had two sons, Joel and Josh. Joel died of lung cancer in 1958 at age 13.

The couple formed half of a formidable Hollywood family. Michael Kanin’s younger brother Garson Kanin was a screenwriter and married to Ruth Gordon, who won the Oscar for best supporting actress for her performance in “Rosemary’s Baby.”

Fay Kanin’s writing credits also include the 1949 Broadway comedy “Goodbye, My Fancy,” the 1959 Broadway adaptation of “Rashomon” and other TV movies such as “Heartsounds” and “Hustling.”

Michael Kanin died in 1993. Survivors include Mrs. Kanin’s son, Josh, and four grandchildren.

— Los Angeles Times