On his own, Jerry Mouse appears in a fantasy sequence in the 1945 Gene Kelly MGM musical film Anchors Aweigh.[10] Jerry appears as the ruler of a kingdom where music is banned because he feels he lacks talent, and Kelly persuades the mouse into performing a song-and-dance number with him.[11] Kelly and MGM had originally wanted Walt Disney's Mickey Mouse as Kelly's dance partner for the sequence, but Disney was unwilling to license the character.[12]
Hanna and Barbera achieved the effect of Kelly dancing with Jerry by rotoscoping: live-action plates of Kelly dancing alone were shot first, and the action traced frame by frame so that Jerry's movements would match.[12] The success of the animated segment of Anchors Aweigh, which was noted as "stealing the show" in contemporary trade reviews,[11] led to two more live-action/animated projects for Hanna and Barbera and MGM: an underwater ballet sequence featuring both Tom and Jerry in Esther Williams' 1953 film Dangerous When Wet, and the "Sinbad the Sailor" sequence of Kelly's 1956 film Invitation to the Dance.[12]