Peckinpah initially considered Bo Hopkins for the part of Billy, but he eventually cast country music star Kris Kristofferson as the outlaw. Kristofferson was 36 when the film was made, playing 21-year-old Billy. Kristofferson's band would play small roles, along with his wife Rita Coolidge. Kristofferson also brought Bob Dylan into the film, initially hired to write the title song. Dylan eventually wrote the score and played the role of "Alias". Peckinpah had never heard of Dylan, but was reportedly moved by hearing him play the proposed title song and hired him immediately. Among the songs written by Dylan for the film was "Knockin' on Heaven's Door,".