David Davis, a veteran comedy writer who co-created the indelible ensemble comedies “The Bob Newhart Show” and “Taxi,” died Nov. 4 in Los Angeles. He was 86 years old.

Davis’ death was confirmed Saturday by his daughter, Samantha Davis-Friedman. Survivors also include his wife of many decades, “Rhoda” star Julie Kavner, now best known as the voice of Marge Simpson.

Davis was known for his work in the MTM Television stable. He wrote for “The Mary Tyler Moore Show” and “Rhoda,” in addition to helping to craft two Hall of Fame sitcoms. After retiring from writing in 1979, Davis worked as a consultant on TV and film projects, including the ABC TV series “Phenom” and noted features such as 1987’s “Broadcast News” and the 1983 Oscar winner “Terms of Endearment.”

Born in Brooklyn in 1936, Davis got his start in TV as a script supervisor on such early 1960s comedies as “The Many Loves of Dobie Gillis” and the pilot for “Gilligan’s Island.” He moved up the ranks by the mid-1960s to associate producer on series such as “My Mother the Car” (often cited as the apex of silly ’60s sitcoms) and “He and She,” a short-lived but highly influential 1967 romantic comedy series starring Richard Benjamin and Paula Prentiss.

Davis shot footage highlighting Chicago’s post-modernist building boom in the early 1970s for the memorable title sequence of “The Bob Newhart Show.” He also lensed the memorable 1974 “Rhoda’s Wedding” episode of “Mary Tyler Moore” spinoff “Rhoda,” which featured Valerie Harper racing through New York City in a wedding dress.

Davis co-created “Bob Newhart Show” for Newhart, who was by then a well-established comedic voice. The series ran on CBS from 1972 to 1978. Davis followed that up with “Taxi” which aired from 1978 to 1983 (at first on ABC and in its final season on NBC). The acclaimed series was co-created by Davis with fellow MTM writer/producer/directors James L. Brooks, Stan Daniels and Ed. Weinberger.

In addition to Kavner and Davis-Friedman, Davis’ survivors include daughter Abigail Davis Smith, son-in-law Steve Smith; and five grandsons, Joshua Friedman, Jacob Friedman, Aden Smith, Asher Smith and Elijah Smith.