Steve Landesberg, an actor and comedian with a friendly and often deadpan manner who was best known for his role on the long-running sitcom “Barney Miller,” died in Los Angeles on Monday. He was 74.

The cause was colon cancer, his daughter, Elizabeth, said.

On “Barney Miller,” which ran on ABC from 1975 to 1982, Mr. Landesberg played Sgt. Arthur P. Dietrich, an intellectual detective with a quiet manner who seemed to have an unrivaled knowledge of practically any topic that arose, much to the bewilderment of his fellow detectives.

Image Steve Landesberg, right, with Hal Linden on “Barney Miller.” Credit... ABC, via Photofest

He was also given to odd, unexpected pronouncements. In one 1980 episode he tells his boss, Captain Miller, played by Hal Linden, that he is working on a case that dates to 1973. Miller says: “That was seven years ago! Nixon was president!” Dietrich’s low-key response: “No, he’s got an airtight alibi for this one.”