LOS ANGELES — Filmmaker Stanley Donen, a giant of the Hollywood musical who through such classics 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 Saturday.

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 such unforgettable scenes as Kelly dancing with an animated Jerry the mouse in "Anchors Aweigh," Astaire's gravity-defying spin across the ceiling in "Royal Wedding," and, the all-time triumph, Kelly ecstatically splashing about as he performs the title number in "Singin' in the Rain."

Director Stanley Donen received an Oscar for Lifetime Achievement in 1998. He died Thursday at age 94. REED SAXON / AP

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 60's 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 on Saturday.

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 the filmmakers knew that "Singin' in the Rain," released in 1952 and also starring Debbie Reynolds and Donald O'Connor, would be revered decades later.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"You can't get through a movie if you don't think it's good," he told The Associated Press. "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."

1952: A poster for 'Singing In The Rain', the musical comedy starring Gene Kelly, Debbie Reynolds and Donald O'Connor. MPI / Getty Images

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. He was more than ready. Donen danced cheek-to-cheek with his Oscar statuette, which he called "this cute little fella." The crowd yelled and applauded 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 added, "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 such films 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 the darker "It's Always Fair Weather," in which three soldier friends reunite a decade later.

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 worked in various genres. "Indiscreet" (1958) was a light farce starring Grant and Ingrid Bergman, and "Two for the Road" (1967), with Hepburn and Albert Finney, was an unusually acerbic and tense marital comedy for its time, far removed from the carefree spirit of his musicals. (Donen himself was married five times and had an embroidered pillow in his New York apartment reading "EAT DRINK AND RE-MARRY".)

One Donen film, the chic mystery "Charade" (1963), reminded viewers of a Hitchcock thriller. "Charade" starred Hepburn as a precocious socialite whose husband has been murdered, and Grant — who appeared in four Hitchcock films — as a mysterious man who may or may not be helping her.

Donen steadfastly denied any Hitchcock influence, while adding that the master of suspense "doesn't own the genre."

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.

None of his more recent films approached the heights of his most famous work. The nadir may have been 1984's "Blame It on Rio," a comedy about a man (Michael Caine) who has an affair with his friend's young daughter. Roger Ebert slammed the film as "clearly intended to appeal to the prurient interests of dirty old men of all ages."

Other credits include a musical segment for the 1980s TV comedy "Moonlighting" and a stage production of "The Red Shoes." In 1999, he directed the ABC television movie "Love Letters," which starred Steven Weber and Laura Linney.

"There are limits to TV," Donen told The Associated Press in 1999. "And that's what was fun: to try to find a way to be surprising within limits. I'm always looking for limits, because then you have to be inventive."