Gerhardt wrote the hymn for Passiontide in 16 stanzas of 6 lines each to the melody of "O Welt, ich muß dich lassen", which is taken from the earlier secular "Innsbruck, ich muss dich lassen" attributed to Heinrich Isaac.
Gerhardt based his work on a meditation on the Passion by Martin Moller, part of his 1587 Soliloquia de passione [REF].