Besides “A Chorus Line” — one of the most enduring stage musicals of all time — Mr. Hamlisch’s movie portfolio included the inspired revival of Scott Joplin’s jaunty ragtime music for “The Sting,” the sweepingly romantic theme for “The Way We Were” and the sensuous ballad“Nobody Does It Better” for the James Bond film “The Spy Who Loved Me.” He also wrote music for two early Woody Allen comedies and the score for the Holocaust drama “Sophie’s Choice.”
Mr. Hamlisch, who died Monday at 68 in Los Angeles of undisclosed causes, was one of the most ubiquitous show-business personalities of his generation. He toured the country playing the piano and warbling for decades, including as a musical accompanist and straight man for comedian Groucho Marx in the early 1970s.
He was principal pops conductor at a half-dozen symphony orchestras, including the National Symphony Orchestra in Washington from 2000 to 2011 and again as recently as last month for a concert date.
Mr. Hamlisch was the somber-looking, bespectacled pinup of a nerdy girl’s dreams, sending Gilda Radner as her “Saturday Night Live” character Lisa Loopner into spasms of awkward ecstasy.
Mr. Hamlisch could get a little cocky. He created a musical high-wire act called “rent-a-composer,” in which he composed instant songs to titles called out by audience members. “I can make a song up about anything: garbage, the weather, things in the news,” he once said.
He could afford to be a little cocky. His awards haul included the Pulitzer Prize, the Oscar, the Tony, the Emmy and the Grammy. He achieved an Academy Awards hat trick in 1974, winning in three music categories — score adaptation (“The Sting”), best original dramatic score (“The Way We Were”) and best song (“The Way We Were,” with the lyricists Alan and Marilyn Bergman).
On his third trip to the podium, Mr. Hamlisch quipped to the Oscar-night crowd, “I think we can now talk to each other as friends.”
It was the sort of self-effacing gab that made him a frequent talk show guest. Along with John Williams, Mr. Hamlisch was one of the few composers who enjoyed a public profile that made him instantly recognizable to much of the general public.
His music for “The Sting” — helped by a first-rate movie starring Paul Newman and Robert Redford as Depression-era con men who try to cheat a gangster — was often credited with reviving Joplin from near-obscurity. Mr. Hamlisch’s recordings of Joplin songs, including “The Entertainer,” sold millions of copies.
On first hearing, Joplin may have sounded anachronistic on “The Sting” soundtrack. His turn-of-the-century rags were no one’s idea of contemporary music by the 1930s — the setting for the film. But it established a playful mood essential for director George Roy Hill’s romp.