The song was composed for a musical comedy titled "Dirigível" ("Airship"), then a work in progress of Vinicius de Moraes. The original title was "Menina que Passa" ("The Girl Who Passes By"); the first verse was different. Jobim composed the melody on his piano in his new house in Rua Barão da Torre, in Ipanema. In turn, Moraes had written the lyrics in Petrópolis, near Rio de Janeiro, as he had done with "Chega de Saudade" ("No More Blues") six years earlier. While firmly rooted in bossa nova, "The Girl from Ipanema" includes influences from blues and Tin Pan Alley.