Marvin Hamlisch, the award-winning composer of A Chorus Line and The Way We Were, has died suddenly at the age of 68, prompting warm tributes from Barbra Streisand, Liza Minnelli, former US first lady Nancy Reagan and dozens of stage and screen stars.
Hamlisch, the musical force behind The Sting and numerous other movies and Broadway shows, died in Los Angeles on Monday, a family spokesman said.
He collapsed following what was called "a brief illness". Details were not made public.
Streisand, a friend of 45 years and star of romantic movie The Way We Were, said she was "devastated" at his death and recalled how he had played at her 1998 wedding.
"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 ... He was a true musical genius but above all that, he was a beautiful human being. I will truly miss him," she added in a statement.
Hamlisch, who was working until days before his death, earned the rare distinction of winning Emmy, Grammy, Oscar and Tony awards.
Minnelli said she had been friends with Hamlisch since the age of 13 and recalled he arranged her first and second albums.
"I have lost my first lifelong best friend, and sadly we have lost a splendid, splendid talent," the singer and actress said in a statement.
In a 2010 interview, Hamlisch told Broadway World that in writing The Way We Were he was trying to match "a very yin-yang sort of movie".
He explained: "I wanted to write something that was uplifting and positive; on the other hand, there is a tremendous amount of bitter-sweetness to that film - and bittersweet romance - so it's a real duality. And that's why I think the song - though it's in the major mode - is quite sad," he said.
The New York City-born composer, raised by Jewish parents and showing an early ability to mimic music as a young child, started out his professional career as a rehearsal pianist for Funny Girl, beginning a long history of working with Streisand. He said Streisand "has the best voice there is".
His collaborations included musical director and arranger of Streisand's 1994 US concert tour, for which he won two Emmy Awards, and writing the score for Streisand's 1996 film, The Mirror has Two Faces, for which Hamlisch earned an Oscar nomination for the Streisand-Bryan Adams duet, I've Finally Found Someone.
His other film scores included Sophie's Choice and Ordinary People and he co-wrote the ballad Nobody Does It Better for the 1977 James Bond film The Spy Who Loved Me.
Nancy Reagan recalled Hamlisch as a frequent entertainer at White House parties in the 1980s, and how he wrote a 77th birthday song for her late husband, former US President Ronald Reagan.
Hamlisch was "a dear friend and I am truly stunned by his death at such a young age ... I don't think you could ever find a more contemporary and talented musician," Reagan said.
Actress Debra Messing, star of the TV shows Smash and Will & Grace, said on Twitter; "The GREAT Marvin Hamlisch passed away... What a loss. What a talent. What contributions."
Starting with 1969 film The Swimmer, Hamlisch scored films for the next several decades, including Woody Allen's Take the Money and Run and Bananas, Save the Tiger, Ice Castles, right up to Steven Soderbergh's The Informant! in 2009. He had recently been writing the score for a new Soderbergh movie based on the life of the pianist Liberace.
On Broadway, he won a Tony award and a Pulitzer Prize for the 1975 musical A Chorus Line, which at the time became the most successful show on the Great White Way. He also wrote the scores for musicals They're Playing Our Song (1978), The Goodbye Girl (1993) and Sweet Smell Of Success (2002).
He also won four Grammy Awards including two for The Way We Were.
Press representatives said he was scheduled to leave for Nashville later this week to see the Jerry Lewis stage-adapted comedy, The Nutty Professor, for which he wrote the score. He had been working on a new Broadway musical called Gotta Dance.
Hamlisch said he believed in the power of music to connect people.
"Music can make a difference. There is a global nature to music, which has the potential to bring all people together," he said on his website.
At the time of his death, he was principal pops conductor for several US symphony orchestras and was scheduled to conduct the New York Philharmonic in this year's New Year's Eve concert. He is survived by his wife of 25 years, Terre.
Songwriters Alan and Marilyn Bergman, who wrote the lyrics for The Way We Were and worked with Hamlisch on many other projects, called him "our beloved friend. He was family. The world will miss his music, his humor, his genius. We will miss him every day for the rest of our lives."