Harry Morgan, the prolific character actor best known for playing the acerbic but kindly Colonel Potter in the long-running television series “M*A*S*H,” died on Wednesday morning at his home in Los Angeles. He was 96.

His son Charles confirmed his death, saying Mr. Morgan had been treated for pneumonia recently.

In more than 100 movies, Mr. Morgan played Western bad guys, characters with names like Rocky and Shorty, loyal sidekicks, judges, sheriffs, soldiers, thugs and police chiefs.

On television, he played Officer Bill Gannon with a phlegmatic but light touch to Jack Webb’s always-by-the-book Sgt. Joe Friday in the updated “Dragnet,” from 1967 to 1970. He starred as Pete Porter, a harried husband, in the situation comedy “Pete and Gladys” (1960-62), reprising a role he had played on “December Bride” (1954-59). He was also a regular on “The Richard Boone Show” (1963-64), “Kentucky Jones” (1964-65), “The D.A.” (1971-72), “Hec Ramsey” (1972-74), “You Can’t Take It With You” (1987) and “Blacke’s Magic” (1986).

But to many fans he was first and foremost Col. Sherman T. Potter, commander of the 4077th Mobile Army Surgical Hospital unit in Korea. With a wry smile, flat voice and sharp humor, Mr. Morgan played Colonel Potter from 1975 to 1983, when “M*A*S*H” went off the air. He replaced McLean Stevenson , who had quit the series, moving into the role on the strength of his performance as a crazed major general in an early episode.