Nielsen composed the song while working on the first of the two collections titled En Snes danske Viser. According to his diary, it was finished on 14 December 1914. However, he was not satisfied with it and therefore composed a new the following day (CNW 205). See more about this work at The Royal Library