Marvin Hamlisch and Barbra Streisand at the Cedars-Sinai Board of Governors Gala at the Beverly Hilton Hotel in November. Hamlisch composed the Streisand hit "The Way We Were" for the movie of the same name.

Marvin Hamlisch and Barbra Streisand at the Cedars-Sinai Board of Governors Gala at the Beverly Hilton Hotel in November. Hamlisch composed the Streisand hit "The Way We Were" for the movie of the same name. (Alex J. Berliner / Cedars-Sinai Medical Center)

When Marvin Hamlisch auditioned for the Juilliard School of Music, he played not Chopin or Mozart but the American folk standard "Goodnight, Irene," a choice that could have had lamentable results for any other prospective student.

But Hamlisch quickly established there was little about his talent that was ordinary: He could perform the song in any key the admissions committee requested — and he was but 6 years old.

By the time he was 30, the former prodigy — the youngest student the prestigious New York school had ever admitted — was a wunderkind composer for Broadway and Hollywood, whose contribution to American popular music would bring comparisons to Richard Rodgers and George Gershwin.

Hamlisch — winner of three Academy Awards for 1973's "The Way We Were" and"The Sting," a Tony and a Pulitzer for the 1975 Broadway sensation"A Chorus Line," and four Emmys — collapsed and died Monday in Los Angeles at 68 after a brief illness, his publicist Ken Sunshine said. No other details were given.

A showman as well as a versatile composer, Hamlisch conquered an early fear of performing to become a draw on the nightclub circuit and later was principal pops conductor for several major symphonies, including the Pittsburgh Symphony Orchestra, Milwaukee Symphony Orchestra, Dallas Symphony Orchestra, Seattle Symphony and San Diego Symphony.

Last month he conducted the Pasadena Symphony and Pops, which named him its principal pops conductor in 2011, and the Philadelphia Orchestra was set to announce his appointment to its pops podium next week.

Like Rodgers — the only other American composer to rival Hamlisch in the number of top awards — and Gershwin, Hamlisch "left a very specific … original mark on American music and added to the great American songbook with works he himself composed," said Paul Jan Zdunek, chief executive of the Pasadena Symphony Assn.

Hamlisch, who would sometimes remark that his last name began with "ham" for a reason, charmed audiences with his ad-libs and improvisational agility. He routinely included in his concerts a short segment he called "Rent-a-Composer," in which he composed and performed songs based on the audience's usually outlandish suggestions.

"The world will remember Marvin for his brilliant musical accomplishments, from 'A Chorus Line' to 'The Way We Were,' and so many others, but when I think of him now, it was his brilliantly quick mind, his generosity, and delicious sense of humor that made him a delight to be around," Barbra Streisand, who recorded her first million-selling single with "The Way We Were," said in a statement Tuesday. "He was a true musical genius."

Although he could easily have rested on his laurels, Hamlisch continued to write for movies, most recently for Steven Soderbergh's quirky 2009 comedy "The Informant!"

He was working on another Soderbergh project — a film about Liberace, starring Michael Douglas and Matt Damon — and was planning to travel to Nashville this week to see "The Nutty Professor," a stage musical he scored for director Jerry Lewis, who wrote and starred in the 1963 sci-fi comedy that inspired the current show. Hamlisch, who lived in New York, also had Broadway hopes for another musical he was working on called "Gotta Dance."

"He didn't want to waste a moment," said Michael Feinstein, the pianist-singer who is known for his devotion to the American songbook and who was slated to perform with Hamlisch and the New York Philharmonic onNew Year's Eve. "He had a passion for living, and he loved what he did.... His intelligence and sensitivity gave him the tools to musicalize life experiences in a very authentic way."

Marvin Frederick Hamlisch was born in New York City on June 2, 1944. His Austrian Jewish father, Max, was an accordionist with his own band. He once described his mother, Lily Schacter, as "a real Jewish, terrific mother." He had an older sister, Terry.

By age 5 he could play songs on the piano by ear after hearing them on the radio. He was a mischievous student in elementary school until a piano was wheeled into his classroom and he became the accompanist for school plays.

Hamlisch began giving public recitals in his teens but vomited violently before performances and finally gave up when "it became obvious it was going to kill me," he told Newsday in 1974. Enamored of show tunes, he focused his energies on composing and first heard his music performed before an audience when he was the music counselor at a girls' camp at Lake Geneva, N.Y.

One of his camp songs, "Travelin' Man," was recorded by Liza Minnelli on her first album, "Liza, Liza," released in 1964. That year he got his first taste of Broadway as an assistant to vocal arranger Buster Davis in "Funny Girl," starring Streisand as showgirl Fanny Brice.

A few years later Hamlisch was asked to play the piano at a party for Hollywood producer Sam Spiegel. The party changed his life. Three days after the event, he surprised the producer with a complete score for a dramatic movie Spiegel was planning to make called "The Swimmer," based on a John Cheever story. Spiegel hired him on the spot. Hamlisch submitted the score to his teacher at Queens College, who accepted it in lieu of the string quartet Hamlisch was supposed to write for a class assignment. He graduated from Queens in 1967 with a degree in music.

His work for Spiegel on the 1968 movie jump-started a prolific career composing for films. He produced music for more than 30 movies, including director Woody Allen's "Take the Money and Run" (1969) and "Bananas" (1971), "Kotch" (1971), "Fat City" (1972), "Save the Tiger" (1973) and "The Prisoner of Second Avenue" (1974).

At the same time he was writing for Broadway and penned the music for "Minnie's Boys," a musical inspired by the Marx Brothers' career. Though the play was a flop, he toured with Groucho Marx for three years as pianist and straight man.

His year for the record books was 1973, when he co-wrote the music for "The Way We Were" with Marilyn and Alan Bergman. The theme song at first failed to impress Streisand, who thought it was too simple musically. Hamlisch said he had to beg her to sing it, and she agreed only after the rest of the cast out-voted her. It became one of her signature songs.

Hamlisch shared the Oscar for best original song with the Bergmans and also won the Oscar for best original dramatic score. At the same Academy Awards ceremony, he won an Oscar for his adaptation of Scott Joplin's ragtime music for "The Sting," the 1973 movie starring Paul Newman and Robert Redford as two 1930s con men. Hamlisch's lush orchestrations have been credited with reviving interest in Joplin's music.

When the composer got up to receive his third Oscar of the night, he quipped, "I think we can now talk to each other as friends."

He stormed Broadway the following year, 1975, when "A Chorus Line" opened to generally glowing reviews.

The backstage musical conceived, choreographed and directed by Michael Bennett and based on the book by James Kirkwood Jr. and Nicholas Dante ran for more than 6,000 performances. It became the longest-running production in Broadway history until it was surpassed by "Cats" in 1997. It also won nine Tonys, including best musical score for Hamlisch and lyricist Edward Kleban.

Several of the Hamlisch-Kleban tunes became hits, including "One" and "What I Did for Love," which has been recorded by Jack Jones, Tony Bennett, Johnny Mathis and Andy Williams, among others.

It was one of only seven musicals to win a Pulitzer Prize and, among Hamlisch's many contributions to American music, it is the one that "will keep him alive for generations to come," said Miles Kreuger, president of the Los Angeles-based Institute of the American Musical.

Despite the many honors Hamlisch earned, he remained highly susceptible to self-doubt. As he wrote in his 1992 memoir, "The Way I Was," he was crushed by a negative comment in an otherwise enthusiastic review of "Chorus Line" by the New York Times' Clive Barnes, who wrote that Hamlisch's music was only "occasionally hummable." Hamlisch wrote that he was so distraught he locked himself in his apartment for days.

A self-described "square," he rarely went without a suit and tie and wore thick black-framed glasses that inspired Gilda Radner's "Nerd" sketches for"Saturday Night Live." He spent many Saturday nights alone because, he told CNN interviewer Sonya Friedman in 1992, "I learned that success only brings you success."

His next Broadway outing was in 1979 with Neil Simon's "They're Playing Our Song." With music by Hamlisch and lyrics by Carole Bayer Sager, it starred Robert Klein and Lucie Arnaz as two songwriters ensnared in a stormy relationship and was said to have been based on Hamlisch's relationship with Bayer Sager. It ran for more than 1,000 performances and later opened in London.

He had collaborated with Bayer Sager on "Nobody Does It Better," the theme song for the 1977 James Bond movie "The Spy Who Loved Me." It became a hit for singer Carly Simon.

He also wrote the score for the 1986 Broadway production "Smile," based on the film comedy of the same name. It closed after only 48 performances, sending Hamlisch into a long depression during which "all I could do was eat myself up alive," he told the Los Angeles Times in 2002.

In 1989 his marriage to television reporter and producer Terre Blair after a long-distance courtship made life rosy again. "She redirected my freneticism," he told the San Francisco Chronicle in 1992. She survives him.

His other film work included scores for the Oscar-winning films"Ordinary People"(1980) and "Sophie's Choice" (1982). Hamlisch also composed the music for the 2002 Tony-nominated musical "Sweet Smell of Success."

He ventured into classical music with "Anatomy of Peace," a composition based on a 1945 book by Emery Reves and performed by the Dallas Symphony in 1991.

But he acknowledged that his chief joy was writing popular music. "The biggest thrill you can have is to tell people one of your songs," he once said, "and have them be able to hum it."

NAVAL STATION NORFOLK — The Navy on Saturday commissioned the USS John Warner, adding a 12th Virginia-class submarine to the fleet and celebrating the legacy of its namesake, the retired senator who was hailed as a statesman.