Larry Gelbart, the seasoned comedy writer heralded for developing the smallscreen adaptation of “MASH” and penning the 1982 smash “Tootsie,” died Friday in Beverly Hills after a battle with cancer. He was 81.

Gelbart’s career spanned six decades, from radio (which led to a job under Bob Hope) to the early days of TV — working with fellow legends Carl Reiner, Mel Brooks and Neil Simon on Sid Caesar’s “Caesar’s Hour” — up through the present day with such telepics as HBO’s “Barbarians at the Gate,” “Weapons of Mass Distraction” and “And Starring Pancho Villa as Himself.”

In June, Gelbart presided over a reading at the WGA West headquarters of the pilot script for a dark comedy, “Pinnacle,” which he was developing.

Gelbart earned an Oscar nom for penning 1977’s “Oh God!” and a second one for “Tootsie.”

Scribe Ken Levine, who worked on “MASH” under Gelbart’s tutelage, has called him “the Mozart of comedy writers.”

Born in Chicago, Gelbart moved to Los Angeles in 1942 as a young teen — and began his career straight out of high school, writing for radio shows such as “Duffy’s Tavern” and “The Eddie Cantor Show.” After a stint in the Army, he began writing gags for comedians who were making the move to TV, including Bob Hope, Red Buttons and Danny Kaye.

That eventually led to Gelbart’s big breakthrough, the spot on “Caesar’s Hour.”

Gelbart then turned his attention to the stage. After the ill-fated musical “The Conquering Hero,” the scribe hit it big in 1962 with “A Funny Thing Happened on the Way to the Forum,” which he wrote with Burt Shevelove (with a score by Stephen Sondheim).

“Forum” was a smash, winning six Tony Awards — including one for its writers.

Gelbart also penned features in this era, including 1962’s “The Notorious Landlady” with Blake Edwards and 1963’s “The Thrill of It All” with his “Caesar’s Hour” colleague Reiner.

But Gelbart made his biggest mark on pop culture starting in 1972, when he signed on to adapt the feature “MASH” (itself an adaptation of a novel) into a TV series. Gelbart wrote the pilot and wound up serving as exec producer on the show — which won the Emmy for best comedy in 1974. Gelbart also earned a Peabody for the series.

He left “MASH” after four years (the show ultimately ran for 11 seasons) but today is still considered the driving force behind one of TV’s all-time classic comedies.

Gelbart was known for being a vocal member of the Writers Guild of America West — sometimes as a critic of guild leaders and sometimes as an ally. He earned the guild’s Valentine Davies and TV Laurel kudos, in addition to eight WGA Awards.

Just last month, Gelbart weighed in on the contentious race for WGA West president. Gelbart threw his support behind Elias Davis and offered a scathing critique of John Wells in an “open letter” to guild members that was widely distribbed on industry-centric blogs and websites.

Gelbart “stood tall among all of us who aspire to writing that truly matters,” WGA West prexy Patric Verrone said. “Time after time he created comedies that made audiences laugh until they hurt while at the same time offering them a serious examination of politics, society and the human condition.”

Gelbart’s wide range of TV credits included the short-lived but critically embraced 1980 series “United States” for NBC. “Barbarians at the Gate,” the sendup of the corporate takeover battles of the late 1980s, earned the Emmy for mini. His later feature credits included 1981’s “Neighbors,” 1984’s “Blame It on Rio” and 2000’s “Bedazzled.”

Gelbart returned to the stage with 1989’s “Mastergate,” based on his novel of the same name, and the musical “City of Angels,” which earned him a second Tony and scored the Tony for musical. A feature adaptation of “City of Angels” is in development.

Gelbart is survived by his wife, Pat; two children; three stepchildren; six grandchildren; and two great-grandchildren.