David Brenner performs at the gala concert where Bill Cosby was presented with the Marian Anderson Award in 2010. (William Thomas Cain/Getty Images)

David Brenner, the lanky, toothy-grinned “Tonight Show” favorite whose brand of observational comedy became a staple for other stand-ups, including Jerry Seinfeld and Paul Reiser, died Saturday. He was 78.

Mr. Brenner, who had been fighting cancer, died at his home in New York City, according to Jeff Abraham, his friend and publicist.

The always-sharply-dressed Brenner became one of the most frequent visitors to Johnny Carson’s “Tonight Show” in the 1970s and ’80s.

His 150-plus appearances as guest and substitute host turned the former documentary filmmaker into a hot comedian, one who was ubiquitous on other talk shows and game shows.

He also briefly hosted his own syndicated talk show in 1987 and starred in four HBO specials.

Mr. Brenner moved with the times, trading routines about the humor of everyday life for jokes about social and political issues, and appearing on MSNBC and Fox News Channel cable programs.

Although his career faltered, he worked steadily through 2013 doing stand-up. A four-day gig in December included a New Year’s Eve show at a Pennsylvania casino-resort in which he showcased young comedians.

Mr. Brenner, who was raised in working-class south Philadelphia and graduated with honors from Temple University, was “always there helping a bright young comedian, whether it be Richard Lewis, Freddie Prinze or Jimmie Walker, and he was still doing it until the very end,” Abraham said.

Although Mr. Brenner took brief stabs at TV fame, with the 1976 sitcom “Snip” and the talk show “Nightlife” he hosted in 1987, he didn’t achieve the success of Seinfeld’s self-titled NBC sitcom or Reiser’s “Mad About You,” and he saw Jay Leno follow Carson as “Tonight Show” host.

In a 2000 interview with the Associated Press, Mr. Brenner said a long custody battle with a girlfriend over their son forced him to curtail his TV appearances and visibility beginning in the mid-1980s, when Mr. Brenner lived in Aspen, Colo.

“In a nutshell, I couldn’t work more than 50 nights a year (out of town) or I’d be an absentee father,” he said. “That was when they were giving out the talk shows, the sitcoms.”

After working early in his career as a documentary filmmaker — “You don’t change the world by doing documentaries,” he told “CBS This Morning” in 2013 — he decided to give comedy a try. He was on the verge of quitting when he made his first “Tonight Show” appearance in January 1971. He went from being nearly broke to making $10,000 an appearance after he was on the show.

In a 1995 interview with the AP, Mr. Brenner imagined a different path with “Tonight.”

“I really believe that had . . . Johnny Carson retired in the early ’80s,” Mr. Brenner said, “then I would be sitting behind that desk,” he said. “I don’t think there’s any doubt.”

Mr. Brenner wrote five books, including the post-9/11 “I Think There’s a Terrorist in My Soup,” published in 2003. His last HBO special, “David Brenner: Back with a Vengeance,” debuted live in 2000.

In a statement, his family said he left a last laugh: A final request that $100 in small bills be placed in his left sock “just in case tipping is recommended where I’m going.”

Survivors include his wife, Ruth; three sons; and a grandson.

To his knowledge, Abraham said, Mr. Brenner was not married to Olympic skating champion Tai Babilonia, despite some reports that she was his widow.