Wayne Rogers, best known as "Trapper John" McIntyre on CBS's "M*A*S*H," died Thursday from pneumonia at the age of 82, his publicist told media.

Rogers starred in the Korean War comedy-drama for its first three seasons before exiting over a contract dispute. He was replaced by Mike Farrell, who joined the show as B.J. Hunnicutt.

Rogers explained in 2012 that the studio wanted to impose "an old-fashioned morals clause" in his contract, but he told the studio, "some of these things I'm not going to agree to," according to Reuters.

Given "M*A*S*H's" longevity (it ran for 11 seasons), Rogers later thought he should have "kept my mouth shut and stayed put."

His co-star, Alan Alda, paid tribute to Rogers on Twitter. The two remained friends even after Rogers left "M*A*S*H."

He went on to play Dr. Charley Michaels on the CBS show "House Calls" and had a recurring role on "Murder, She Wrote." He stopped acting in the early 2000s.

Rogers was born on April 7, 1933 in Birmingham, Ala. as William Wayne McMillan Rogers. He graduated from Princeton University with a degree in history and served time in the military in the 1950s.

He also excelled as a financial analyst, investor and businessman. He produced several Neil Simon stage works and recently appeared on Fox News' "Cashin' In," according to CNN.

Rogers was married twice. He had two children with his first wife, actress Mitzi McWhorter. They divorced and he married producer Amy Hirsh in 1998. He is survived by Hirsh, his two children and four grandchildren.