Thaddeus Q. Mumford, a pioneering African-American TV writer-producer who worked on shows ranging from “MASH” to “The Electric Company” to “Blue’s Clues,” has died after a long illness. He was 67.

Mumford died Sept. 6 at his father’s home in Silver Spring, Md., according to his sister-in-law, Donna Coleman.

With his longtime writing partner Dan Wilcox, Mumford worked on the final three seasons of “MASH,” as well as such shows as “Maude,” “Good Times,” “ALF,” “B.J. and the Bear,” “Coach,” “The Cosby Show,” “A Different World,” “Home Improvement,” and “Judging Amy.”

Mumford was a quick wit who had a knack for coming up with jokes and punch lines. “He was incredibly fast with a fully formed joke,” Wilcox told Variety. “Sometimes you wondered where they came from.”

Wilcox recalled an episode of “MASH” in which David Ogden Stiers’ stuffy Major Charles Winchester character balks at trying acupuncture to treat his back pain. When a character named Dr. Woo pulls out a long needle, Winchester dismisses the treatment as “voodoo.” Harry Morgan’s folksy Col. Sherman Potter quickly responds: “Woo, do that voodoo you do so well,” which was a line Mumford came up with in the clutch, Wilcox recalled.

Wilcox said Mumford was proud of the 1979 “MASH” episode “Are You Now, Margaret?” in which Loretta Swit’s Margaret Houlihan is accused of being a Communist. The script won the pair their staff writer jobs on the show. Mumford earned three other Emmy nominations for his work on “MASH.”

Born and raised in Washington, D.C., Mumford worked as a page for the local NBC affiliate WRC-TV while in high school and soon began selling jokes to Johnny Carson and Joan Rivers. After high school, he attended Fordham University in New York City, where he landed a job as a writer on PBS’ “The Electric Company.” He earned an Emmy for his work on the show in 1973.

The following year, Mumford moved to Los Angeles to break into primetime TV. He got his entry writing jokes for Alan King and Flip Wilson. Mumford and Wilcox, who met in New York while Wilcox was working across the hall from Mumford as a writer for “Sesame Street,” became partners in the late 1970s after Wilcox moved to L.A.

In an era when African Americans were rarely found in TV writers’ rooms, Mumford was committed to crafting fully realized African-American characters and combatting the use of easy stereotypes.

Mumford battled Hollywood ageism in recent years, but he was undaunted and continued to pitch ideas and work on scripts. “He was still thumping the tub to get work,” Wilcox said. “He was always better than any agent in finding us work.”

Mumford was a sports buff and a life-long Yankees fan. He worked as a bat boy for the team as a teenager.

In addition to Coleman, survivors include his brother Jeffrey Mumford, niece Josephine Coleman-Mumford, stepmother Gloria Mumford, stepsister Karen Cooper, and stepbrother Donnell Cooper.