Glen A. Larson, the writer-producer behind such indelible TV dramas as “Battlestar Galactica,” “Magnum, P.I.,” “Knight Rider” and “Quincy M.E.,” has died. He was 77.

Larson died of complications from esophageal cancer on Friday night at UCLA Medical Center.

Larson had a string of TV hits in the 1970s and ’80s, and dozens of writing and producing credits to his name. His shows were rarely favored by critics, but his biggest hits enjoyed long runs in primetime and in syndication.

In reflecting on his long career, Larson credited his success to having a strong sense of the type of shows that would click with Middle America.

Larson said his milieu was defined as shows that were “enjoyable, they had a pretty decent dose of humor and they all struck a chord out there in the mainstream,” Larson told the Archive of American Television in 2009. “What we weren’t going to win … was a shelf full of Emmys. Ours were not the shows that were doing anything more than reaching a core audience. I would like to think that they brought a lot of entertainment into the living room.”

After growing up in Los Angeles, Larson got his start in the biz as a singer and a member of the pop vocal group the Four Preps, and he also worked as an NBC page. (Larson’s earliest mention in Variety is an item from the Aug. 7, 1957, edition of Daily Variety noting that the Four Preps were set for a guest shot on “The Adventures of Ozzie and Harriet.”)

Related 'Battlestar Galactica' Cast and Creators Reunite at Comic-Con 'Battlestar Galactica' ATX Reunion Goes According to Plan (Sort Of)

By the mid-1960s he had segued into TV writing and in 1969 he began a long tenure at Universal TV, starting with a spec script that he sold to “It Takes a Thief,” which starred Robert Wagner, whom Larson had known since his days at Hollywood High School. During his early Universal years, Larson was a key producer on “McCloud” with Dennis Weaver.

Larson created his first show, “Alias Smith and Jones,” in 1971, but left the ABC Western right after star Peter Duel committed suicide.

Larson also co-created “Quincy M.E.” with Lou Shaw. The NBC forensic drama starring Jack Klugman had an eight-season run from 1976-83, although Larson was ousted from the series early on.

He created “Battlestar Galactica” a few years later, after “Star Wars” ignited showbiz interest in space operas. Although the original series lasted only one season — ABC cut the cord in 1979 after two dozen episodes partly because of its hefty production cost — it had a “Star Trek”-like rebirth in the mid-2000s on Syfy.

Writers Ronald D. Moore and David Eick steered the Syfy revival that began as a miniseries in 2003 and expanded to a regular series that garnered critical acclaim for stars Edward James Olmos, Mary McConnell, Katie Sackhoff and Tricia Helfer.

“Magnum, P.I.” was a smash hit for CBS that launched Tom Selleck into stardom and ran from 1980-88. Larson created the show with Donald Bellisario, with whom he had already worked with on “Quincy M.E.” and “Battlestar Galactica.” Selleck played a Vietnam vet turned private investigator in Hawaii.

Larson was a key player in the career of TV leading man Lee Majors, who starred in the Larson-created ABC series “The Six Million Dollar Man” (1974-78) and “The Fall Guy” (1981-86).

Larson wrote and exec produced NBC’s “Knight Rider” (1982-86), starring David Hasselhoff as a crime-fighter whose work was aided by a talking car and supercomputer, K.I.T.T., voiced by William Daniels.

Larson earned three Emmy nominations during his long career, all for producing. “McCloud” was nommed for limited series in 1974 and 1975, while “Quincy” grabbed a best drama series bid in 1978.

More recently, Larson reunited with other members of the Four Preps in 2004 for a PBS special.

In addition to his brother, Larson is survived by his wife Jeannie; former wives Carol Gourley and Janet Curtis; and nine children.

Here is an interview with Larson about his long career from the Archive of American Television: