The music for "Where the Streets Have No Name" originated from a demo that guitarist The Edge composed the night before the group resumed "The Joshua Tree" sessions. In an upstairs room at Melbeach House—his newly purchased home—he used a four-track tape machine to record an arrangement of keyboards, bass, guitar, and a drum machine. Realising that the album sessions were approaching the end and that the band were short on exceptional live songs, he wanted to "conjure up the ultimate U2 live-song", so he imagined what he would like to hear at a future U2 show if he were a fan. After finishing the rough mix, he felt he had come up with "the most amazing guitar part and song of life". With no one in the house to share the demo with, he recalls dancing around and punching the air in celebration.