LOS ANGELES — Filmmaker Stanley Donen, a giant of the Hollywood musical who through classics such as “Singin’ in the Rain” and “Funny Face” helped give us some of the most joyous sounds and images in movie history, has died. He was 94.

Donen, who often teamed with Gene Kelly but also worked with Cary Grant, Frank Sinatra and Fred Astaire, died Thursday in New York from heart failure, his sons Joshua and Mark Donen confirmed.

The 1940s and ’50s were the prime era for Hollywood musicals and no filmmaker contributed more to the magic than Donen, among the last survivors from that era and one willing to extend the limits of song and dance into the surreal. He was part of the unit behind unforgettable scenes such as Kelly dancing with an animated Jerry the mouse in “Anchors Aweigh,” Astaire’s gravity-defying spin across the ceiling in “Royal Wedding,” and Kelly ecstatically splashing about as he performs the title number in “Singin’ in the Rain.”

Steven Spielberg recalled Donen as a “friend and early mentor” for whom life and film were inseparable.

“His generosity in giving over so many of his weekends in the late ’60s to film students like me to learn about telling stories and placing lenses and directing actors is a time I will never forget,” Spielberg said.

The filmmaker Guillermo del Toro said, “Before Stanley Donen, actors sang, actors danced. He made the camera dance and the colors sing.”

A 2007 American Film Institute survey of the top 100 American movies ranked “Singin’ in the Rain,” with its inventive take on Hollywood’s transition from silent to talking pictures in the 1920s and Kelly’s famous dance in a downpour, at No. 5.

Donen was asked in 2002 whether he knew that “Singin’ in the Rain,” released in 1952 and also starring Debbie Reynolds and Donald O’Connor, would be revered decades later.

“You can’t get through a movie if you don’t think it’s good,” he said. “Certainly we thought it was good. More than that? I don’t know. You don’t think about that. You just think about how you can do it.”

Both the film and Donen were at first underrated. “Singin’ in the Rain” was initially seen as high entertainment rather than art and was not even nominated for a best picture or directing Academy Award. Donen, overshadowed by Kelly early in his career, never received a competitive Oscar nomination and waited until 1998 for an honorary award, presented to him by Martin Scorsese. Donen danced cheek-to-cheek with his Oscar statuette as he crooned, “Heaven, I’m in heaven,” from Irving Berlin’s “Cheek to Cheek.”

During his acceptance speech, he explained his formula for a great musical. Bring in songwriters like Adolph Green and Betty Comden, and performers like Kelly or Astaire or Sinatra. “And when filming starts,” he said, “you show up and you stay the hell out of the way.”

Born in Columbia, South Carolina, Donen would remember movies – especially those with Astaire and Ginger Rogers – as a needed escape from the tensions of being one of the few Jews in his community. He took tap dancing lessons in his teens and began his show business career as a performer, dancing in the original Broadway production of “Pal Joey” at age 16. The title role was played by Kelly, and the show’s success propelled Kelly into the movies.

Donen received his first Hollywood break when Kelly got him a job helping choreograph the 1944 Kelly film “Cover Girl.” Over the next few years, he worked on choreography for films such as “The Kissing Bandit,” starring Sinatra, and “Take Me Out to the Ballgame,” starring Sinatra and Kelly, who teamed with Donen on choreography.

“Singin’ in the Rain” was one of three films credited to Kelly and Donen as co-directors; the others were “On the Town,” the 1949 Kelly-Sinatra musical about sailors on leave in New York City, and “It’s Always Fair Weather,” in which three soldier friends reunite.

The co-director credits – rare in films – came out of a tense relationship between Donen and the star, who had played such an important role in advancing Donen’s career. Donen would later speak resentfully of Kelly, who died in 1996, as being cold and condescending and not fully appreciative of his contributions. They parted for good after “It’s Always Fair Weather,” which came out in 1955.

“He could be difficult with me and everyone else,” the director told The New York Times in 1996. “It was always a complicated collaboration.”

Other Donen films included “Seven Brides for Seven Brothers” (1954), with its superlative athletic choreography; “Damn Yankees” (1958), the remake of the Broadway smash about a baseball fan’s temptation; and “Funny Face,” in which Astaire teamed up with Audrey Hepburn to play a fashion photographer and his unlikely muse.

Astaire’s character in “Funny Face” was modeled on Richard Avedon, and the famed photographer served as a consultant to Donen.

“Nothing is more fun than finding someone who stimulates you, and who can be stimulated by you,” Donen said in John Kobal’s book “Gotta Sing Gotta Dance: A Pictorial History of Film Musicals.” “The result, rather than just adding up to two and two, multiplies itself, and you find yourself doing much better things – you are both carried away on the crest of excitement.”

Donen had three sons; the oldest, Peter, died in 2003 of a heart attack at age 50. His first wife, dancer Jeanne Coyne, later married Kelly. His fourth wife was the screen star Yvette Mimieux. Over the past two decades, his companion was the filmmaker-comedian Elaine May.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.