Gene Thompson, who entered show business as a teenage protege of Groucho Marx and went on to enjoy a successful career as a comedy, drama and mystery writer for radio and television, died April 14 of cancer at his home in Los Angeles. He was 76.

He was a writer on such series as “Gilligan’s Island,” “My Favorite Martian,” “The Lucy Show,” “The Bob Newhart Show” and “The Beverly Hillbillies.” He contributed the most scripts for the popular TV series “Love, American Style” and wrote for dramatic series such as “Marcus Welby, M.D.,” “Cannon” and “Columbo.”

A native of San Francisco, he met Dame May Whitty backstage while she was appearing in “Romeo and Juliet” there. They corresponded and upon graduation from high school at age 16 he moved to Los Angeles and took acting lessons from the celebrated thespian.

While at her home, on a chance encounter he met Groucho Marx, who invited him home for dinner with such luminaries as Moss Hart, screenwriter Arthur Sheekman and actress Gloria Stuart. Marx later let Thompson write comedy sketches for him and secured him a job writing for the popular radio show “Duffy’s Tavern.”

Thompson went to college and UC Santa Barbara and then UC Berkeley before working in Germany as director of publications for the Army Corps of Engineers, English instructor for Army personnel and a lecturer at the U. of Heidelberg.

Thompson then spent a decade writing advertising copy in New York and San Francisco before relocating to Los Angeles, where he hit his stride as a television script writer.

By the end of the 1970s, Thompson segued into novel writing with works that included “Lupe” (his first novel), “Nobody Cared for Kate” and “A Cup of Death.”

He is survived by his wife of 45 years, writer Sylvia Thompson; four children; 12 grandchildren; and his sister.