Mr. Donen, who had graduated from a South Carolina high school that June at the age of 16, was a member of the chorus; Kelly was the star. They were together again the next year on Broadway in “Best Foot Forward,” Kelly as choreographer and Mr. Donen as dancer. The film critic Andrew Sarris wrote in his book “The American Cinema” that Mr. Donen was “dismissed for a time as Gene Kelly’s invisible partner.”

But there was no dismissing the quality, or the impact, of his solo directorial debut, “Royal Wedding.” With a score by Lerner (who also wrote the screenplay) and Burton Lane, it starred Astaire as an American dancer who is in London to do a show with his sister (Powell) during the same period as the wedding of Princess Elizabeth and Prince Philip.

Astaire’s character falls in love with a dancer in his show, played by Sarah Churchill (a daughter of the prime minister). One evening he comes home to his flat and, inspired by her photograph, begins to dance — first on the floor and then, in cheerful violation of the laws of physics, on the walls and ceiling.

The sequence, famous in Hollywood lore, took place in a chamber that revolved depending on where weight was applied. Astaire called it the iron lung. (Both Astaire and Lerner took credit for coming up with the idea.)

In his book “Dancing on the Ceiling: Stanley Donen and His Movies” (1996), Stephen M. Silverman wrote that the room’s draperies were made of wood and the coat that Astaire took off was sewn to the chair where he left it, which in turn was screwed to the floor. The year after making “Royal Wedding,” for MGM, Mr. Donen teamed up again with Kelly for the same studio to make “Singin’ in the Rain,” widely regarded as one of the best movie musicals ever made.

Although they shared directing tasks throughout the movie — a story of the early days of talking pictures starring Kelly, Debbie Reynolds, Donald O’Connor and Jean Hagen, with a screenplay by Comden and Green and songs from the 1920s and ′30s — there was no question who was behind the camera when a thoroughly soaked Kelly bounded ecstatically down a back-lot street in a downpour singing the title song, his dancing partner an umbrella that he ultimately thrust into the hands of a grateful passer-by. The critic Roger Ebert called it “probably the most joyous musical sequence ever filmed.”